I have a function that returns the true / false Ruby type. For some reason I cant get rspec to swallow this.
This errors out: user.authorize.should == true (where user.authorize in the debugger does return true… so this test should succeed)
With this error (this seems to be a syntax error, not a failed test… it gives me not even the failing line in my rspec test code) /Users/DK/.rvm/gems/ruby-1.9.2-p0@wavelineup3/gems/rspec-expectations-2.0.0.beta.22/lib/rspec/expectations/fail_with.rb:29:in `fail_with’: expected: true, (RSpec::Expectations::ExpectationNotMetError) got: false (using ==)
This is the ugly backtrace:
/Users/DK/.rvm/gems/ruby-1.9.2-p0@wavelineup3/gems/rspec-expectations-2.0.0.beta.22/lib/rspec/expectations/fail_with.rb:29:in fail_with': expected: true, (RSpec::Expectations::ExpectationNotMetError) got: false (using ==) from /Users/DK/.rvm/gems/ruby-1.9.2-p0@wavelineup3/gems/rspec-expectations-2.0.0.beta.22/lib/rspec/matchers/operator_matcher.rb:39:in fail_with_message’
from /Users/DK/.rvm/gems/ruby-1.9.2-p0@wavelineup3/gems/rspec-expectations-2.0.0.beta.22/lib/rspec/matchers/operator_matcher.rb:61:in __delegate_operator' from /Users/DK/.rvm/gems/ruby-1.9.2-p0@wavelineup3/gems/rspec-expectations-2.0.0.beta.22/lib/rspec/matchers/operator_matcher.rb:51:in eval_match’
from /Users/DK/.rvm/gems/ruby-1.9.2-p0@wavelineup3/gems/rspec-expectations-2.0.0.beta.22/lib/rspec/matchers/operator_matcher.rb:29:in block in use_custom_matcher_or_delegate' from /Users/DK/Documents/ror/projects/wavelineup3/spec/models/user_spec.rb:32:in block (2 levels) in <top (required)>’
from /Users/DK/.rvm/gems/ruby-1.9.2-p0@wavelineup3/gems/rspec-core-2.0.0.beta.22/lib/rspec/core/example_group.rb:130:in module_eval' from /Users/DK/.rvm/gems/ruby-1.9.2-p0@wavelineup3/gems/rspec-core-2.0.0.beta.22/lib/rspec/core/example_group.rb:130:in subclass’
from /Users/DK/.rvm/gems/ruby-1.9.2-p0@wavelineup3/gems/rspec-core-2.0.0.beta.22/lib/rspec/core/example_group.rb:117:in describe' from /Users/DK/Documents/ror/projects/wavelineup3/spec/models/user_spec.rb:12:in block in <top (required)>’
from /Users/DK/.rvm/gems/ruby-1.9.2-p0@wavelineup3/gems/rspec-core-2.0.0.beta.22/lib/rspec/core/example_group.rb:130:in module_eval' from /Users/DK/.rvm/gems/ruby-1.9.2-p0@wavelineup3/gems/rspec-core-2.0.0.beta.22/lib/rspec/core/example_group.rb:130:in subclass’
from /Users/DK/.rvm/gems/ruby-1.9.2-p0@wavelineup3/gems/rspec-core-2.0.0.beta.22/lib/rspec/core/example_group.rb:117:in describe' from /Users/DK/.rvm/gems/ruby-1.9.2-p0@wavelineup3/gems/rspec-core-2.0.0.beta.22/lib/rspec/core/extensions/object.rb:7:in describe’
from /Users/DK/Documents/ror/projects/wavelineup3/spec/models/user_spec.rb:3:in <top (required)>' from /Users/DK/.rvm/gems/ruby-1.9.2-p0@wavelineup3/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:235:in load’
from /Users/DK/.rvm/gems/ruby-1.9.2-p0@wavelineup3/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:235:in block in load' from /Users/DK/.rvm/gems/ruby-1.9.2-p0@wavelineup3/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:227:in load_dependency’
from /Users/DK/.rvm/gems/ruby-1.9.2-p0@wavelineup3/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:235:in load' from /Users/DK/.rvm/gems/ruby-1.9.2-p0@wavelineup3/gems/rspec-core-2.0.0.beta.22/lib/rspec/core/configuration.rb:308:in block in load_spec_files’
from /Users/DK/.rvm/gems/ruby-1.9.2-p0@wavelineup3/gems/rspec-core-2.0.0.beta.22/lib/rspec/core/configuration.rb:308:in map' from /Users/DK/.rvm/gems/ruby-1.9.2-p0@wavelineup3/gems/rspec-core-2.0.0.beta.22/lib/rspec/core/configuration.rb:308:in load_spec_files’
from /Users/DK/.rvm/gems/ruby-1.9.2-p0@wavelineup3/gems/rspec-core-2.0.0.beta.22/lib/rspec/core/command_line.rb:18:in run' from /Users/DK/.rvm/gems/ruby-1.9.2-p0@wavelineup3/gems/rspec-core-2.0.0.beta.22/lib/rspec/core/runner.rb:36:in run_in_process’
from /Users/DK/.rvm/gems/ruby-1.9.2-p0@wavelineup3/gems/rspec-core-2.0.0.beta.22/lib/rspec/core/runner.rb:27:in run' from /Users/DK/.rvm/gems/ruby-1.9.2-p0@wavelineup3/gems/rspec-core-2.0.0.beta.22/bin/rspec:3:in <top (required)>’
from /Users/DK/.rvm/gems/ruby-1.9.2-p0@wavelineup3/bin/rspec:19:in load' from /Users/DK/.rvm/gems/ruby-1.9.2-p0@wavelineup3/bin/rspec:19:in ’
rake aborted!
Command failed with status (1): [/Users/DK/.rvm/rubies/ruby-1.9.2-p0/bin/ru…]
(See full trace by running task with --trace)
Thanks,
David