fix an undefined cucumber step

This commit is contained in:
Reinier Balt 2012-03-24 10:01:17 +01:00
parent 7435b1ba93
commit 163389d914
2 changed files with 7 additions and 6 deletions

View file

@ -12,15 +12,15 @@ Feature: Edit a context
And I have a project called "test project"
And I have 2 todos in project "test project" in context "@pc" with tags "starred" prefixed by "test_project "
@javascript
@javascript @wip
Scenario: In place edit of context name
Given I have a context called "Errands"
When I go to the context page for "Errands"
And I edit the context name in place to be "OutAndAbout"
Then I should see the context name is "OutAndAbout"
When I go to the contexts page
Then he should see that a context named "Errands" is not present
And he should see that a context named "OutAndAbout" is present
Then I should see that a context named "Errands" is not present
And I should see that a context named "OutAndAbout" is present
@javascript
Scenario: Editing the context of a todo will remove the todo
@ -34,7 +34,7 @@ Feature: Edit a context
Scenario: Editing the description of a a todo will update that todo
When I go to the the context page for "@pc"
And I edit the description of "test_project todo 1" to "changed"
Then I should not see "test_project todo 1"
Then I should not see the todo "test_project todo 1"
And I should see "changed"
@javascript

View file

@ -51,9 +51,10 @@ Then /^context "([^"]*)" should be above context "([^"]*)"$/ do |context_high, c
context_list_find_index(context_high).should < context_list_find_index(context_low)
end
Then /^I should see that a context named "([^"]*)" is not present$/ do |context_name|
Then /^I should see that a context named "([^"]*)" (is|is not) present$/ do |context_name, present|
is_not = present=="is not" ? "not " : ""
within "div#display_box" do
step "I should not see \"#{context_name}\""
step "I should #{is_not}see \"#{context_name}\""
end
end