I'm working on a scenario right now and I think I've just been looking
at it too long and could use a second eye. I'm getting "The model: 'a
journal entry' is not known in this scenario. Use #create_model to
create, or #find_model to find, and store a reference in this
scenario. (Pickle::Session::ModelNotKnownError)" on the last step.
I know this has worked in the past because it's supposed to do a
lookup for the model. My other factories are loading fine and I have a
factory defined for journal_entry too. Am I not able to say "Then a
model should exist" without creating it with pickle first?
Scenario: Create a journal entry
Given I am signed in as "
jo...@example.com"
And I am on the journal entries page
When I fill in "New journal entry" with "A new journal entry"
And I press "Create entry"
Then a journal entry should exist with description: "A new journal
entry", user: the user
# Factory
Factory.define :journal_entry do |j|
j.description "A sample journal entry"
end
The confusing part is that I can see that the proper regex is there
for journal_entry too.
The model: 'a journal entry' is not known in this scenario. Use
#create_model to create, or #find_model to find, and store a reference
in this scenario. (Pickle::Session::ModelNotKnownError)
./features/step_definitions/pickle_steps.rb:20:in `/^((?:(?:)|(?:
(?:a|an|another|the|that) )?(?:(?:(?:(?:first|last|(?:\d+(?:st|nd|rd|
th))) )?(?:journal[_ ]entry|account|permission|user))|(?:
(?:journal[_ ]entry|account|permission|user)(?::? "(?:[^\"]|\.)*")))))
should exist(?: with ((?:(?:\w+: (?:(?:(?:)|(?:(?:a|an|another|the|
that) )?(?:(?:(?:(?:first|last|(?:\d+(?:st|nd|rd|th))) )?
(?:journal[_ ]entry|account|permission|user))|(?:(?:journal[_ ]entry|
account|permission|user)(?::? "(?:[^\"]|\.)*"))))|(?:"(?:[^\"]|\.)*"|
nil|true|false|[+-]?[0-9_]+(?:\.\d+)?))), )*(?:\w+: (?:(?:(?:)|(?:(?:a|
an|another|the|that) )?(?:(?:(?:(?:first|last|(?:\d+(?:st|nd|rd|
th))) )?(?:journal[_ ]entry|account|permission|user))|(?:
(?:journal[_ ]entry|account|permission|user)(?::? "(?:[^\"]|\.)*"))))|
(?:"(?:[^\"]|\.)*"|nil|true|false|[+-]?[0-9_]+(?:\.\d+)?)))))?$/'
Rails 3
Pickle 0.4.2
Cucumber Rails 0.3.2
Factory girl rails 1.0
Any help is much appreciated.