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

Conversation

Projects
None yet
1 participant
@mizzy
Owner

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.

Quick hack for #324
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 pull request Dec 28, 2013

@mizzy mizzy merged commit ef19e00 into master Dec 28, 2013

1 check was pending

default The Travis CI build is in progress
Details

@mizzy mizzy deleted the expect-does-not-call-custom-matchers branch Dec 28, 2013

@mizzy

This comment has been minimized.

Show comment
Hide comment
@mizzy

mizzy Dec 28, 2013

Owner

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.

Owner

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 pull request Dec 28, 2013

Subject should be serverspec resource type class
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

This comment has been minimized.

Show comment
Hide comment
@mizzy

mizzy Mar 27, 2014

Owner

Released as v1.0.0.

Owner

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