jasminerice-runner 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -6,10 +6,20 @@ Uses capybara to run jasmine specs with jasminerice and rails asset pipeline
6
6
  Usage
7
7
  -----
8
8
 
9
+ Add it to your Gemfile
10
+
11
+ gem "jasminerice-runner"
12
+
9
13
  Add this to your spec.js:
10
14
 
11
15
  #= require jasminerice_reporter
12
16
 
13
17
  Then, run the rake task
14
18
 
15
- rake jasminerice:run
19
+ rake jasminerice:run
20
+
21
+ To switch drivers, in a config/initializer
22
+
23
+ Jasminerice::Runner.capybara_driver = :webkit
24
+
25
+ Default driver is :selenium
@@ -1,4 +1,7 @@
1
1
  module Jasminerice
2
+ class Runner
3
+ cattr_accessor :capybara_driver
4
+ end
2
5
  class JasmineRiceRunnerEngine < Rails::Engine
3
6
  end
4
7
  end
@@ -1,9 +1,14 @@
1
1
  module Jasminerice
2
2
  class Runner
3
+
3
4
  include Capybara::DSL
4
-
5
+
6
+ def capybara_driver
7
+ self.class.capybara_driver || :selenium
8
+ end
9
+
5
10
  def run
6
- Capybara.default_driver = :selenium
11
+ Capybara.default_driver = capybara_driver
7
12
  visit "/jasmine"
8
13
  puts "Running jasmine specs"
9
14
  wait_until { page.evaluate_script("window.jasmineRiceReporter.finished")}
@@ -1,5 +1,5 @@
1
1
  module Jasminerice
2
2
  class Runner
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jasminerice-runner
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
9
+ - 2
10
+ version: 0.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Chris Nelson
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-05-02 00:00:00 -04:00
18
+ date: 2012-06-18 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency