Skip to content

Instantly share code, notes, and snippets.

@mike-burns
Created August 26, 2011 18:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mike-burns/1174060 to your computer and use it in GitHub Desktop.
Save mike-burns/1174060 to your computer and use it in GitHub Desktop.
shoulda-matchers failure
~/lib/shoulda-matchers% rake
(in /home/mike/lib/shoulda-matchers)
>> bundle install --gemfile=gemfiles/3.0.3.gemfile
Fetching source index for http://rubygems.org/
Using rake (0.8.7)
Using abstract (1.0.0)
Using activesupport (3.0.3)
Using builder (2.1.2)
Using i18n (0.6.0)
Using activemodel (3.0.3)
Using erubis (2.6.6)
Using rack (1.2.3)
Using rack-mount (0.6.14)
Using rack-test (0.5.7)
Using tzinfo (0.3.29)
Using actionpack (3.0.3)
Using mime-types (1.16)
Using polyglot (0.3.2)
Using treetop (1.4.10)
Using mail (2.2.19)
Using actionmailer (3.0.3)
Using arel (2.0.10)
Using activerecord (3.0.3)
Using activeresource (3.0.3)
Using bundler (1.0.12)
Using appraisal (0.3.8)
Using bcat (0.6.1)
Using ffi (1.0.9)
Using childprocess (0.2.1)
Using diff-lcs (1.1.2)
Using json (1.5.3)
Using gherkin (2.4.16)
Using term-ansicolor (1.0.6)
Using cucumber (0.10.7)
Using rdiscount (1.6.8)
Using rspec-core (2.6.4)
Using rspec-expectations (2.6.0)
Using rspec-mocks (2.6.0)
Using rspec (2.6.0)
Using aruba (0.4.5)
Using columnize (0.3.4)
Using rbx-require-relative (0.0.5)
Using linecache (0.46)
Using mocha (0.9.12)
Using thor (0.14.6)
Using railties (3.0.3)
Using rails (3.0.3)
Using rspec-rails (2.6.1)
Using ruby-debug-base (0.10.4)
Using ruby-debug (0.10.4)
Using shoulda-matchers (1.0.0.beta3) from source at /home/mike/lib/shoulda-matchers
Using sqlite3 (1.3.4)
Using sqlite3-ruby (1.3.3)
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
>> bundle install --gemfile=gemfiles/3.1.0.rc1.gemfile
Fetching source index for http://rubygems.org/
Using rake (0.8.7)
Using multi_json (1.0.3)
Using activesupport (3.1.0.rc1)
Using bcrypt-ruby (2.1.4)
Using builder (3.0.0)
Using i18n (0.6.0)
Using activemodel (3.1.0.rc1)
Using erubis (2.7.0)
Using rack (1.3.2)
Using rack-cache (1.0.2)
Using rack-mount (0.8.2)
Using rack-test (0.6.1)
Using hike (1.2.1)
Using tilt (1.3.3)
Using sprockets (2.0.0.beta.15)
Using tzinfo (0.3.29)
Using actionpack (3.1.0.rc1)
Using mime-types (1.16)
Using polyglot (0.3.2)
Using treetop (1.4.10)
Using mail (2.3.0)
Using actionmailer (3.1.0.rc1)
Using arel (2.1.4)
Using activerecord (3.1.0.rc1)
Using activeresource (3.1.0.rc1)
Using bundler (1.0.12)
Using appraisal (0.3.8)
Using bcat (0.6.1)
Using ffi (1.0.9)
Using childprocess (0.2.1)
Using diff-lcs (1.1.2)
Using json (1.5.3)
Using gherkin (2.4.16)
Using term-ansicolor (1.0.6)
Using cucumber (0.10.7)
Using rdiscount (1.6.8)
Using rspec-core (2.6.4)
Using rspec-expectations (2.6.0)
Using rspec-mocks (2.6.0)
Using rspec (2.6.0)
Using aruba (0.4.5)
Using coffee-script-source (1.1.2)
Using execjs (1.2.4)
Using coffee-script (2.2.0)
Using columnize (0.3.4)
Using rack-ssl (1.3.2)
Using thor (0.14.6)
Using railties (3.1.0.rc1)
Using jquery-rails (1.0.13)
Using rbx-require-relative (0.0.5)
Using linecache (0.46)
Using mocha (0.9.12)
Using rails (3.1.0.rc1)
Using rspec-rails (2.6.1)
Using ruby-debug-base (0.10.4)
Using ruby-debug (0.10.4)
Using sass (3.1.7)
Using shoulda-matchers (1.0.0.beta3) from source at /home/mike/lib/shoulda-matchers
Using sqlite3 (1.3.4)
Using sqlite3-ruby (1.3.3)
Using uglifier (1.0.1)
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
(in /home/mike/lib/shoulda-matchers)
>> BUNDLE_GEMFILE=gemfiles/3.0.3.gemfile bundle exec /var/lib/gems/1.8/bin/rake spec cucumber
(in /home/mike/lib/shoulda-matchers)
.............................................................................................................................................................................................................................................................
Finished in 25.04 seconds
253 examples, 0 failures
....................................
2 scenarios (2 passed)
30 steps (30 passed)
1m14.307s
>> BUNDLE_GEMFILE=gemfiles/3.1.0.rc1.gemfile bundle exec /var/lib/gems/1.8/bin/rake spec cucumber
(in /home/mike/lib/shoulda-matchers)
.....................................................................................................................FFFF......................................................................................................................................
Failures:
1) Shoulda::Matchers::ActionController::RespondWithContentTypeMatcher a controller responding with content type :xml should accept responding with content type :xml
Failure/Error: @controller = build_response { render :xml => { :user => "thoughtbot" }.to_xml }
ArgumentError:
wrong number of arguments (1 for 0)
# ./spec/shoulda/action_controller/respond_with_content_type_matcher_spec.rb:7:in `example'
# ./spec/support/model_builder.rb:113:in `build_response'
# ./spec/shoulda/action_controller/respond_with_content_type_matcher_spec.rb:7
2) Shoulda::Matchers::ActionController::RespondWithContentTypeMatcher a controller responding with content type :xml should accept responding with content type 'application/xml'
Failure/Error: @controller = build_response { render :xml => { :user => "thoughtbot" }.to_xml }
ArgumentError:
wrong number of arguments (1 for 0)
# ./spec/shoulda/action_controller/respond_with_content_type_matcher_spec.rb:7:in `example'
# ./spec/support/model_builder.rb:113:in `build_response'
# ./spec/shoulda/action_controller/respond_with_content_type_matcher_spec.rb:7
3) Shoulda::Matchers::ActionController::RespondWithContentTypeMatcher a controller responding with content type :xml should accept responding with content type /xml/
Failure/Error: @controller = build_response { render :xml => { :user => "thoughtbot" }.to_xml }
ArgumentError:
wrong number of arguments (1 for 0)
# ./spec/shoulda/action_controller/respond_with_content_type_matcher_spec.rb:7:in `example'
# ./spec/support/model_builder.rb:113:in `build_response'
# ./spec/shoulda/action_controller/respond_with_content_type_matcher_spec.rb:7
4) Shoulda::Matchers::ActionController::RespondWithContentTypeMatcher a controller responding with content type :xml should reject responding with another content type
Failure/Error: @controller = build_response { render :xml => { :user => "thoughtbot" }.to_xml }
ArgumentError:
wrong number of arguments (1 for 0)
# ./spec/shoulda/action_controller/respond_with_content_type_matcher_spec.rb:7:in `example'
# ./spec/support/model_builder.rb:113:in `build_response'
# ./spec/shoulda/action_controller/respond_with_content_type_matcher_spec.rb:7
Finished in 22.38 seconds
255 examples, 4 failures
Failed examples:
rspec ./spec/shoulda/action_controller/respond_with_content_type_matcher_spec.rb:10 # Shoulda::Matchers::ActionController::RespondWithContentTypeMatcher a controller responding with content type :xml should accept responding with content type :xml
rspec ./spec/shoulda/action_controller/respond_with_content_type_matcher_spec.rb:14 # Shoulda::Matchers::ActionController::RespondWithContentTypeMatcher a controller responding with content type :xml should accept responding with content type 'application/xml'
rspec ./spec/shoulda/action_controller/respond_with_content_type_matcher_spec.rb:18 # Shoulda::Matchers::ActionController::RespondWithContentTypeMatcher a controller responding with content type :xml should accept responding with content type /xml/
rspec ./spec/shoulda/action_controller/respond_with_content_type_matcher_spec.rb:22 # Shoulda::Matchers::ActionController::RespondWithContentTypeMatcher a controller responding with content type :xml should reject responding with another content type
rake aborted!
ruby -S bundle exec rspec --color --format progress spec/shoulda/active_model/validate_acceptance_of_matcher_spec.rb spec/shoulda/active_model/ensure_inclusion_of_matcher_spec.rb spec/shoulda/active_model/ensure_length_of_matcher_spec.rb spec/shoulda/active_model/validate_format_of_matcher_spec.rb spec/shoulda/active_model/validate_numericality_of_matcher_spec.rb spec/shoulda/active_model/allow_value_matcher_spec.rb spec/shoulda/active_model/validate_uniqueness_of_matcher_spec.rb spec/shoulda/active_model/allow_mass_assignment_of_matcher_spec.rb spec/shoulda/active_model/validate_presence_of_matcher_spec.rb spec/shoulda/action_mailer/have_sent_email_spec.rb spec/shoulda/action_controller/respond_with_content_type_matcher_spec.rb spec/shoulda/action_controller/redirect_to_matcher_spec.rb spec/shoulda/action_controller/set_the_flash_matcher_spec.rb spec/shoulda/action_controller/set_session_matcher_spec.rb spec/shoulda/action_controller/render_with_layout_matcher_spec.rb spec/shoulda/action_controller/filter_param_matcher_spec.rb spec/shoulda/action_controller/respond_with_matcher_spec.rb spec/shoulda/action_controller/assign_to_matcher_spec.rb spec/shoulda/action_controller/route_matcher_spec.rb spec/shoulda/action_controller/render_template_matcher_spec.rb spec/shoulda/active_record/have_db_index_matcher_spec.rb spec/shoulda/active_record/have_db_column_matcher_spec.rb spec/shoulda/active_record/have_readonly_attributes_matcher_spec.rb spec/shoulda/active_record/association_matcher_spec.rb failed
(See full trace by running task with --trace)
@mike-burns
Copy link
Author

The solution seemed to be to use a different version of Ruby.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment