get the reporters working better and add features
This commit is contained in:
parent
489da3041d
commit
ca86a577d8
2
.gitignore
vendored
2
.gitignore
vendored
@ -15,3 +15,5 @@ spec/reports
|
||||
test/tmp
|
||||
test/version_tmp
|
||||
tmp
|
||||
.jhw-cache/
|
||||
|
||||
|
4
Gemfile
4
Gemfile
@ -2,3 +2,7 @@ source 'https://rubygems.org'
|
||||
|
||||
# Specify your gem's dependencies in jasmine-headless-webkit-reporters.gemspec
|
||||
gemspec
|
||||
|
||||
gem 'jasmine-headless-webkit', :path => '../jasmine-headless-webkit'
|
||||
gem 'cucumber'
|
||||
gem 'rspec'
|
||||
|
6
features/junit.feature
Normal file
6
features/junit.feature
Normal file
@ -0,0 +1,6 @@
|
||||
Feature: JUnit Reporter
|
||||
Scenario:
|
||||
Given I want to use the "JUnit" reporter
|
||||
When I run the test suite
|
||||
Then it should succeed
|
||||
|
@ -0,0 +1,4 @@
|
||||
Given /^I want to use the "([^"]*)" reporter$/ do |reporter|
|
||||
@reporter = reporter
|
||||
end
|
||||
|
3
features/step_definitions/then/it_should_succeed.rb
Normal file
3
features/step_definitions/then/it_should_succeed.rb
Normal file
@ -0,0 +1,3 @@
|
||||
Then /^it should succeed$/ do
|
||||
$?.exitstatus.should == 0
|
||||
end
|
3
features/step_definitions/when/i_run_test_suite.rb
Normal file
3
features/step_definitions/when/i_run_test_suite.rb
Normal file
@ -0,0 +1,3 @@
|
||||
When /^I run the test suite$/ do
|
||||
%x{jasmine-headless-webkit -f #{@reporter}}
|
||||
end
|
6
features/teamcity.feature
Normal file
6
features/teamcity.feature
Normal file
@ -0,0 +1,6 @@
|
||||
Feature: Teamcity Reporter
|
||||
Scenario:
|
||||
Given I want to use the "Teamcity" reporter
|
||||
When I run the test suite
|
||||
Then it should succeed
|
||||
|
7
spec/javascripts/super_log_spec.js.coffee
Normal file
7
spec/javascripts/super_log_spec.js.coffee
Normal file
@ -0,0 +1,7 @@
|
||||
describe 'Super Long Test', ->
|
||||
for index in [1..10000]
|
||||
describe "run #{index}", ->
|
||||
it 'should succeed', ->
|
||||
for check in [1..100]
|
||||
expect(check).toEqual(check)
|
||||
|
9
spec/javascripts/support/jasmine.yml
Normal file
9
spec/javascripts/support/jasmine.yml
Normal file
@ -0,0 +1,9 @@
|
||||
src_dir: 'src'
|
||||
spec_dir: 'spec/javascripts'
|
||||
|
||||
src_files:
|
||||
- "*.js"
|
||||
|
||||
spec_files:
|
||||
- "*_spec.*{js,coffee}"
|
||||
|
0
src/test.js
Normal file
0
src/test.js
Normal file
@ -6,3 +6,15 @@ class jasmine.HeadlessReporter.JUnit extends jasmine.JUnitXmlReporter
|
||||
writeFile: (filename, text) =>
|
||||
JHW.print(@outputTarget, text)
|
||||
|
||||
reportSpecResults: (spec) =>
|
||||
JHW.ping()
|
||||
super(spec)
|
||||
|
||||
reportRunnerResults: (runner) =>
|
||||
super(runner)
|
||||
|
||||
JHW.finishSuite()
|
||||
|
||||
if window.JHW
|
||||
window.onbeforeunload = null
|
||||
|
||||
|
@ -6,3 +6,15 @@ class jasmine.HeadlessReporter.Teamcity extends jasmine.TeamcityReporter
|
||||
log: (text) =>
|
||||
JHW.print(@outputTarget, text + "\n")
|
||||
|
||||
reportSpecResults: (spec) =>
|
||||
JHW.ping()
|
||||
super(spec)
|
||||
|
||||
reportRunnerResults: (runner) =>
|
||||
super(runner)
|
||||
|
||||
JHW.finishSuite()
|
||||
|
||||
if window.JHW
|
||||
window.onbeforeunload = null
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user