Skip to content

Commit 0bdb3d2

Browse files
committed
Fixed bugged spec
1 parent 6ff7899 commit 0bdb3d2

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

spec/features/article_composing_spec.rb

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,24 @@
1010

1111
scenario 'Create an article' do
1212

13+
my_title = 'A new article title'
14+
my_body = 'Something interesting to say'
15+
1316
within(main_menubar) { click_link 'Articles' }
1417
within(action_bar) { click_link 'New Article' }
1518

1619
within page_body do
1720
# This will fill visible fields i.e. for the default locale
18-
fill_in 'Title', with: 'A new article title'
19-
fill_in 'Body', with: 'Something interesting to say'
21+
fill_in 'Title', with: my_title
22+
fill_in 'Body', with: my_body
2023
submit_button.click
2124
end
2225

2326
page.should have_content 'Article was successfully created.'
2427

2528
# Retrieve created article from database
26-
article = Article.first
27-
page.should have_content article.title
28-
page.should have_content article.body
29+
page.should have_content my_title
30+
page.should have_content my_body
2931
end
3032

3133
context 'Viewing article translations' do

0 commit comments

Comments
 (0)