Commit e5fbce6d76a7c2a42d13156f2208a09a239de880
1 parent
64e6a134
Exists in
colab
and in
4 other branches
Added Konacha for JavaScript unit testing
Showing
5 changed files
with
28 additions
and
0 deletions
Show diff stats
Gemfile
@@ -68,6 +68,9 @@ group :development, :test do | @@ -68,6 +68,9 @@ group :development, :test do | ||
68 | # Deployment | 68 | # Deployment |
69 | gem 'capistrano' | 69 | gem 'capistrano' |
70 | gem 'rvm-capistrano' | 70 | gem 'rvm-capistrano' |
71 | + | ||
72 | + # JavaScript unit tests | ||
73 | + gem "konacha", "~> 3.0.0" | ||
71 | end | 74 | end |
72 | 75 | ||
73 | # Acceptance tests | 76 | # Acceptance tests |
Gemfile.lock
@@ -60,6 +60,7 @@ GEM | @@ -60,6 +60,7 @@ GEM | ||
60 | coffee-script-source | 60 | coffee-script-source |
61 | execjs | 61 | execjs |
62 | coffee-script-source (1.6.3) | 62 | coffee-script-source (1.6.3) |
63 | + colorize (0.5.8) | ||
63 | cucumber (1.3.2) | 64 | cucumber (1.3.2) |
64 | builder (>= 2.1.2) | 65 | builder (>= 2.1.2) |
65 | diff-lcs (>= 1.1.3) | 66 | diff-lcs (>= 1.1.3) |
@@ -102,6 +103,12 @@ GEM | @@ -102,6 +103,12 @@ GEM | ||
102 | railties (>= 3.0, < 5.0) | 103 | railties (>= 3.0, < 5.0) |
103 | thor (>= 0.14, < 2.0) | 104 | thor (>= 0.14, < 2.0) |
104 | json (1.8.0) | 105 | json (1.8.0) |
106 | + konacha (3.0.0) | ||
107 | + actionpack (>= 3.1, < 5) | ||
108 | + capybara | ||
109 | + colorize | ||
110 | + railties (>= 3.1, < 5) | ||
111 | + sprockets | ||
105 | libv8 (3.16.14.3) | 112 | libv8 (3.16.14.3) |
106 | mail (2.5.4) | 113 | mail (2.5.4) |
107 | mime-types (~> 1.16) | 114 | mime-types (~> 1.16) |
@@ -235,6 +242,7 @@ DEPENDENCIES | @@ -235,6 +242,7 @@ DEPENDENCIES | ||
235 | jbuilder (~> 1.2) | 242 | jbuilder (~> 1.2) |
236 | jquery-rails | 243 | jquery-rails |
237 | kalibro_entities! | 244 | kalibro_entities! |
245 | + konacha (~> 3.0.0) | ||
238 | mocha | 246 | mocha |
239 | modernizr-rails | 247 | modernizr-rails |
240 | pg (~> 0.17.0) | 248 | pg (~> 0.17.0) |
@@ -0,0 +1,8 @@ | @@ -0,0 +1,8 @@ | ||
1 | +Konacha.configure do |config| | ||
2 | + require 'capybara/poltergeist' | ||
3 | + | ||
4 | + config.spec_dir = "spec/javascripts" | ||
5 | + config.spec_matcher = /_spec\.|_test\./ | ||
6 | + config.stylesheets = %w(application) | ||
7 | + config.driver = :poltergeist | ||
8 | +end if defined?(Konacha) | ||
0 | \ No newline at end of file | 9 | \ No newline at end of file |