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

Added feature specs for have_enqueued_job matcher #1486

Merged
merged 1 commit into from Nov 10, 2015
Merged

Added feature specs for have_enqueued_job matcher #1486

merged 1 commit into from Nov 10, 2015

Conversation

morgoth
Copy link
Contributor

@morgoth morgoth commented Nov 8, 2015

Follow up to #1464 and #1480

@morgoth
Copy link
Contributor Author

morgoth commented Nov 8, 2015

I'm trying to figure out how to conditionally skip tests when AJ is not available, so I added cucumber step https://github.com/rspec/rspec-rails/pull/1486/files#diff-e6a0765839735d337aa3101a10bc43bbR6 but I don't know how to implement it, as https://github.com/rspec/rspec-rails/pull/1486/files#diff-922aab2260697e2bbe72d3df4147da81R7 is evaluated in context of #<Object+ArubaExt+Aruba::Api+RSpec::Matchers+Cucumber::RbSupport::RbWorld+JSON::Ext::Generator::GeneratorMethods::Object+Kernel:0x2ada022b4f38> so using https://github.com/rspec/rspec-rails/blob/master/lib/rspec/rails/feature_check.rb#L21-L23 doesn't work.
Can anyone give me a clue how to make it work?

@@ -2,3 +2,7 @@
step %q{the output should contain "0 failures"}
step %q{the exit status should be 0}
end

Given /active job integrated/ do
pending "ActiveJob is not available" if false # Implement checking if ActiveJob is available
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you require the relevant part of rspec-rails you'll be able to do this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JonRowe Now tests are passing

@soulcutter
Copy link
Member

Thanks for documenting this! I spoke briefly about this matcher in a talk I gave at the Cleveland Ruby Brigade meetup last Thursday, so it's great to get a cuke around this so more people can know about it :)

soulcutter added a commit that referenced this pull request Nov 10, 2015
Added feature specs for have_enqueued_job matcher
@soulcutter soulcutter merged commit 4696404 into rspec:master Nov 10, 2015
@morgoth morgoth deleted the have_enqueued_job-feature-spec branch November 10, 2015 21:24
@morgoth
Copy link
Contributor Author

morgoth commented Nov 11, 2015

Any ETA on next rspec-rails release? I would like to introduce have_enqueued_job matcher to my team and it's always more convenient with stable release ;-)

@soulcutter
Copy link
Member

Releasing 3.4.0 this week has been under discussion - I can't promise a specific date, but soon!

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

Successfully merging this pull request may close these issues.

None yet

3 participants