Created
August 27, 2010 14:27
-
-
Save barinek/553447 to your computer and use it in GitHub Desktop.
Reindexing Solr from Cucumber
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Here's a quick snippet that we're using to reindex Solr from our Cucumber features. | |
"And I reindex assets" helps to ensure that we didn't leave any cruft around from previous | |
tests and that we've properly indexed our Pickle model. | |
Background: | |
And I am logged in as an admin user | |
And an asset with snowboarding tags: "snowboarding" exists with title: "Snowboarding", alt_text: "Snowboarding", summary: "A summary about snowboards" | |
And I reindex assets | |
Scenario: An Editor searches for an asset by title | |
When I go to the url: "/assets?q=Snowboarding" | |
Then I should see "Snowboarding" | |
Here's the actual step | |
When /^I reindex (.+)$/ do |model_name| | |
model_name.singularize.capitalize.constantize.solr_reindex | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment