Commit a0f58500 authored by haseeb's avatar haseeb

removed creating project

parent 9a304721
require 'spec_helper' require 'spec_helper'
describe 'Embedded Snippets' do describe 'Embedded Snippets' do
let(:project) { create(:project, :repository) } let(:snippet) { create(:personal_snippet, :public, file_name: 'random_dir.rb', content: content) }
let(:snippet) { create(:personal_snippet, :public, file_name: 'popen.rb', content: content) } let(:content) { "require 'fileutils'\nFileUtils.mkdir_p 'some/random_dir'\n" }
let(:content) { project.repository.blob_at('master', 'files/ruby/popen.rb').data }
it 'loads snippet', :js do it 'loads snippet', :js do
script_url = "http://#{Capybara.current_session.server.host}:#{Capybara.current_session.server.port}/#{snippet_path(snippet, format: 'js')}" script_url = "http://#{Capybara.current_session.server.host}:#{Capybara.current_session.server.port}/#{snippet_path(snippet, format: 'js')}"
...@@ -18,7 +17,7 @@ describe 'Embedded Snippets' do ...@@ -18,7 +17,7 @@ describe 'Embedded Snippets' do
visit("http://#{server.host}:#{server.port}/embedded_snippet.html") visit("http://#{server.host}:#{server.port}/embedded_snippet.html")
expect(page).to have_content("popen.rb") expect(page).to have_content("random_dir.rb")
expect(page).to have_content("require 'fileutils'") expect(page).to have_content("require 'fileutils'")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment