Skip to content
This repository has been archived by the owner on Aug 23, 2020. It is now read-only.

undefined method 'expect' #80

Open
elifoster opened this issue May 27, 2017 · 2 comments
Open

undefined method 'expect' #80

elifoster opened this issue May 27, 2017 · 2 comments

Comments

@elifoster
Copy link

When using the --use rspec flag, I get the following error on just about every test case once:

  1) Pair#flip! reverses the pair's values in place
     Failure/Error: expect(pair.right).to eq 1

     NoMethodError:
       undefined method `expect' for #<RSpec::ExampleGroups::Pair::Flip_2:0x007fcd58a3e260>
       Did you mean?  exec
     # ./spec/pair_spec.rb:43:in `block (3 levels) in <top (required)>'

The spec for this particular one is:

describe Pair do
...
  describe '#flip!' do
    it "reverses the pair's values in place" do
      pair = Pair.new(1, 2)
      pair.flip!
      expect(pair.right).to eq 1
      expect(pair.left).to eq 2
    end
  end
...
end
@dgollahon
Copy link
Owner

Could you share the corresponding source you are testing? As well as the full mutest command you are using?

Also, I assume these errors don't happen when you're just running rspec, right?

@elifoster
Copy link
Author

elifoster commented May 27, 2017

The sources are at elifoster/data_types. This issue does not occur just using rspec.

The command is
'mutest --include lib --require data_types --use rspec' iirc (on mobile atm).

I'm back home, the command I'm running is mutest --include lib/data_types --require pair --use rspec 'Pair'

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants