Skip to content

Instantly share code, notes, and snippets.

@nomnel
Created April 26, 2013 06:12
Show Gist options
  • Save nomnel/5465328 to your computer and use it in GitHub Desktop.
Save nomnel/5465328 to your computer and use it in GitHub Desktop.
# coding: utf-8
require 'spec_helper'
feature 'Create new story', js: true do
background do
visit '/users/sign_in'
within("#new_user") do
fill_in 'user[email]', with: 'komagata@gmail.com'
fill_in 'user[password]', with: 'testtest'
end
click_button 'ログイン'
visit new_story_path
end
scenario 'when change story_title, confirmation will be on unexpected page translation' do
within("#new_story") do
fill_in 'story[title]', with: 'My String'
end
# find('#story_title').set 'My String'
# save_and_open_page
visit root_path
current_path.should == new_story_path
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment