This repository has been archived by the owner on Jan 3, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Get everything working for Travis-CI
This is a big step. It's undoing a lot of the work that was done to remove the dependency on the jasmine gem. However, due to the way that Travis-CI works, it's far easier to utilise jasmine:ci than it is to manually invoke things.
- Loading branch information
Showing
22 changed files
with
128 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,6 @@ source :gemcutter | |
source :rubygems | ||
|
||
gem "coffee-script" | ||
gem "jasmine" | ||
gem "json" | ||
gem "sinatra" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
//You may load required files here, or create test-runner-wide environment settings. | ||
//You may load required files here, or create test-runner-wide | ||
//environment settings. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
module Jasmine | ||
class Config | ||
|
||
# Add your overrides or custom config code here | ||
|
||
end | ||
end | ||
|
||
|
||
# Note - this is necessary for rspec2, which has removed the backtrace | ||
module Jasmine | ||
class SpecBuilder | ||
def declare_spec(parent, spec) | ||
me = self | ||
example_name = spec["name"] | ||
@spec_ids << spec["id"] | ||
backtrace = @example_locations[parent.description + " " + example_name] | ||
parent.it example_name, {} do | ||
me.report_spec(spec["id"]) | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
$:.unshift(ENV['JASMINE_GEM_PATH']) if ENV['JASMINE_GEM_PATH'] # for gem testing purposes | ||
|
||
require 'rubygems' | ||
require 'jasmine' | ||
jasmine_config_overrides = File.expand_path(File.join(File.dirname(__FILE__), 'jasmine_config.rb')) | ||
require jasmine_config_overrides if File.exist?(jasmine_config_overrides) | ||
if Jasmine::Dependencies.rspec2? | ||
require 'rspec' | ||
else | ||
require 'spec' | ||
end | ||
|
||
jasmine_config = Jasmine::Config.new | ||
spec_builder = Jasmine::SpecBuilder.new(jasmine_config) | ||
|
||
should_stop = false | ||
|
||
if Jasmine::Dependencies.rspec2? | ||
RSpec.configuration.after(:suite) do | ||
spec_builder.stop if should_stop | ||
end | ||
else | ||
Spec::Runner.configure do |config| | ||
config.after(:suite) do | ||
spec_builder.stop if should_stop | ||
end | ||
end | ||
end | ||
|
||
spec_builder.start | ||
should_stop = true | ||
spec_builder.declare_suites |