Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

spec cleanup

  • Loading branch information...
commit be1e6a58b705d2f67510068d75d44ededdb821ce 1 parent 190cf57
@searls authored
Showing with 7 additions and 12 deletions.
  1. +1 −1  Guardfile
  2. +6 −11 spec/lib/processes_jasmine_directives_spec.rb
View
2  Guardfile
@@ -1,7 +1,7 @@
# A sample Guardfile
# More info at https://github.com/guard/guard#readme
-guard 'rspec', :version => 2, :cli => "--color --fail-fast" do
+guard 'rspec', :version => 2, :cli => "--color" do
watch(%r{^spec/.+_spec\.rb$})
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
watch('spec/spec_helper.rb') { "spec/" }
View
17 spec/lib/processes_jasmine_directives_spec.rb
@@ -6,6 +6,7 @@
describe ProcessesJasmineDirectives do
let(:target_object) { ProcessesJasmineDirectives.new }
let(:context_double) { gimme(Sprockets::Context) }
+ let(:jasmine_config) { gimme_next(Jasmine::Config) }
before(:each) do
Rails.stub(:root => "/some/path/to/where/rails/is/")
@@ -25,16 +26,11 @@
describe "requiring user's #{asset_type}" do
user_asset_files = ["foo_asset", "bar_asset"]
- user_asset_files.each do |f|
- let(:jasmine_config) { gimme_next(Jasmine::Config) }
- let(:context_double) { gimme(Sprockets::Context) }
- let(:target_object) { ProcessesJasmineDirectives.new }
-
+ user_asset_files.each do |f|
before(:each) do
- give(jasmine_config).spec_path { "__spec__" }
+ give(jasmine_config).spec_path { "__spook__" }
give(jasmine_config).spec_dir { "path/to" }
give(jasmine_config).send("#{asset_type}_files") { user_asset_files }
- target_object.stub(:context => context_double)
end
it "requires user's #{f}" do
@@ -49,10 +45,9 @@
describe "requiring a user's spec files" do
it "converts the jasmine spec path to the spec dir" do
- config = gimme_next(Jasmine::Config)
- give(config).send("js_files") { ["my/__spec__/some_spec.js"] }
- give(config).spec_path { "__spec__" }
- give(config).spec_dir { "path/to" }
+ give(jasmine_config).send("js_files") { ["my/__spook__/some_spec.js"] }
+ give(jasmine_config).spec_path { "__spook__" }
+ give(jasmine_config).spec_dir { "path/to" }
target_object.process_require_jasmine_directive("js")
Please sign in to comment.
Something went wrong with that request. Please try again.