Skip to content

Commit

Permalink
Fixed bugged spec
Browse files Browse the repository at this point in the history
  • Loading branch information
fabn committed Sep 24, 2014
1 parent 6ff7899 commit 0bdb3d2
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions spec/features/article_composing_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,24 @@

scenario 'Create an article' do

my_title = 'A new article title'
my_body = 'Something interesting to say'

within(main_menubar) { click_link 'Articles' }
within(action_bar) { click_link 'New Article' }

within page_body do
# This will fill visible fields i.e. for the default locale
fill_in 'Title', with: 'A new article title'
fill_in 'Body', with: 'Something interesting to say'
fill_in 'Title', with: my_title
fill_in 'Body', with: my_body
submit_button.click
end

page.should have_content 'Article was successfully created.'

# Retrieve created article from database
article = Article.first
page.should have_content article.title
page.should have_content article.body
page.should have_content my_title
page.should have_content my_body
end

context 'Viewing article translations' do
Expand Down

0 comments on commit 0bdb3d2

Please sign in to comment.