Sha256: c27f4f87ad23b022d7a18a8fdb0975cc6d2a16787e7e67c2ec46d7cb734719ec
Contents?: true
Size: 770 Bytes
Versions: 1
Compression:
Stored size: 770 Bytes
Contents
require 'spec_helper' describe 'opal core features', :js, :type => :request do before do Capybara.app = lambda do |env| path = env['PATH_INFO'] base_path = File.expand_path('../../test/index.html', __FILE__) case path when /\.js/ contents = File.read(File.join(File.dirname(base_path), '..', path)) [200, {'Content-Type' => 'application/x-javascript'}, [contents]] else contents = File.read(base_path) [200, {'Content-Type' => 'text/html'}, [contents]] end end end it 'runs all specs in the browser' do path = File.expand_path '../../test/index.html', __FILE__ p path visit '/' within '.summary' do page.should have_content(' 0 failures ') end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
opal-0.3.21 | spec/browser_spec.rb |