From bca7bddd3d0c6327e7ce0ce86874d72d1c76788f Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Wed, 12 Dec 2012 19:42:08 +0200 Subject: Add ace editor to snippets --- spec/requests/snippets_spec.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'spec/requests/snippets_spec.rb') diff --git a/spec/requests/snippets_spec.rb b/spec/requests/snippets_spec.rb index 9ef217ba62c..b231b940a84 100644 --- a/spec/requests/snippets_spec.rb +++ b/spec/requests/snippets_spec.rb @@ -48,11 +48,11 @@ describe "Snippets" do page.current_path.should == new_project_snippet_path(project) end - describe "fill in" do + describe "fill in", js: true do before do fill_in "snippet_title", with: "login function" fill_in "snippet_file_name", with: "test.rb" - fill_in "snippet_content", with: "def login; end" + page.execute_script("editor.insert('def login; end');") end it { expect { click_button "Save" }.to change {Snippet.count}.by(1) } @@ -83,7 +83,6 @@ describe "Snippets" do before do fill_in "snippet_title", with: "login function" fill_in "snippet_file_name", with: "test.rb" - fill_in "snippet_content", with: "def login; end" end it { expect { click_button "Save" }.to_not change {Snippet.count} } -- cgit v1.2.1