Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quick fix for #324 #325

Merged
merged 1 commit into from Dec 28, 2013
Merged

Quick fix for #324 #325

merged 1 commit into from Dec 28, 2013

Conversation

@mizzy
Copy link
Owner

@mizzy mizzy commented Dec 28, 2013

As reported by #324, this code doesn't work since v0.14.0.

describe 'sshd daemon' do
  it 'has a running service of ssh' do
    expect(service('ssh')).to be_running
  end
end

It seems that expect notation does not call custom matchers.

One-liner should notation works fine.

As reported by #324, this code doesn't work since v0.14.0.

```ruby
describe 'sshd daemon' do
  it 'has a running service of ssh' do
    expect(service('ssh')).to be_running
  end
end
```

It seems that ``expect`` notation does not call custom matchers.

One-liner ``should`` notation works fine.
mizzy added a commit that referenced this issue Dec 28, 2013
@mizzy mizzy merged commit ef19e00 into master Dec 28, 2013
1 check was pending
@mizzy mizzy deleted the expect-does-not-call-custom-matchers branch Dec 28, 2013
@mizzy
Copy link
Owner Author

@mizzy mizzy commented Dec 28, 2013

It seems that expect notation does not call custom matchers.

This is wrong. expect notation calls custom matchers, but subject is not the expected one.

Custom matchers should not check the subject class.

mizzy added a commit that referenced this issue Dec 28, 2013
In #325, I wrote "Custom matchers should not check the subject class".

But it's not correct.

Custom matchers should check the class of the argument of match block.

I use ``subject`` as the argument name and it is same as the method name
with RSpec.So it's confusing.

I should not use the name ``subject``, but keep them tentatively.
@mizzy
Copy link
Owner Author

@mizzy mizzy commented Mar 27, 2014

Released as v1.0.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant