I'm using Rspec feature specs and when I run them I get output such as:
.............Started GET "/sign_up" for 127.0.0.1 at 2013-08-08 10:52:00 -0700
Started POST "/accounts" for 127.0.0.1 at 2013-08-08 10:52:01 -0700
Started GET "/" for 127.0.0.1 at 2013-08-08 10:52:01 -0700
.Started GET "/sign_in" for 127.0.0.1 at 2013-08-08 10:52:02 -0700
Started POST "/users/sign_in" for 127.0.0.1 at 2013-08-08 10:52:02 -0700
Started GET "/" for 127.0.0.1 at 2013-08-08 10:52:02 -0700
................................. (etc...)
How can I suppress the messages from the requests in my output? I've tried setting log levels to no avail. Any ideas would be appreciated. Thanks!
Edit:
This is a Rails 4 project using Ruby 2.0.
spec/spec_helper.rb
ENV["RAILS_ENV"] ||= 'test'
require File.expand_path("../../config/environment", __FILE__)
require 'rspec/rails'
require 'rspec/autorun'
require 'factory_girl'
require 'capybara/rails'
require 'capybara/rspec'
require 'webmock/rspec'
Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
ActiveRecord::Migration.check_pending! if defined?(ActiveRecord::Migration)
RSpec.configure do |config|
config.mock_with :mocha
config.include FactoryGirl::Syntax::Methods
config.use_transactional_fixtures = true
config.infer_base_class_for_anonymous_controllers = false
config.order = "random"
end
spec/features/sign_in_spec.rb
require "spec_helper"
feature "Sign in" do
background do
account = create(:account)
@admin = account.admin
end
scenario "User signs into the application" do
visit sign_in_path
fill_in "user_email", with: @admin.email
fill_in "user_password", with: @admin.password
click_button "Sign in"
expect(page).to have_content "Signed in successfully"
end
end
spec_helperand one of yourspec- Pierre-Louis Gottfrois