2011-04-14 00:21:23 +00:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe "jasmine-headless-webkit" do
|
|
|
|
describe 'success' do
|
|
|
|
it "should succeed with error code 0" do
|
2011-05-11 14:17:27 +00:00
|
|
|
%x{bin/jasmine-headless-webkit -j spec/jasmine/success/success.yml}
|
2011-04-14 00:21:23 +00:00
|
|
|
$?.exitstatus.should == 0
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
describe 'failure' do
|
|
|
|
it "should fail with an error code of 1" do
|
2011-05-11 14:17:27 +00:00
|
|
|
%x{bin/jasmine-headless-webkit -j spec/jasmine/failure/failure.yml}
|
2011-04-14 00:21:23 +00:00
|
|
|
$?.exitstatus.should == 1
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
describe 'with console.log' do
|
|
|
|
it "should succeed, but has a console.log so an error code of 2" do
|
2011-05-11 14:17:27 +00:00
|
|
|
%x{bin/jasmine-headless-webkit -j spec/jasmine/console_log/console_log.yml}
|
2011-04-14 00:21:23 +00:00
|
|
|
$?.exitstatus.should == 2
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|