Permalink
Browse files

initialization tests

  • Loading branch information...
1 parent 6320110 commit 241b54b7988f6c3e227d765c42b7b35255f087cf @stve stve committed Sep 6, 2012
Showing with 21 additions and 0 deletions.
  1. +1 −0 .rspec
  2. +16 −0 spec/guard/konacha_spec.rb
  3. +4 −0 spec/spec_helper.rb
View
1 .rspec
@@ -0,0 +1 @@
+--color
View
@@ -0,0 +1,16 @@
+require 'spec_helper'
+
+describe Guard::Konacha do
+ subject { Guard::Konacha.new }
+
+ describe '#initialize' do
+ it 'should instantiate with a default spec_dir' do
+ subject.instance_variable_get(:@spec_dir).should eq('spec/javascripts')
+ end
+
+ it 'accepts a spec_dir option to specify a different spec location' do
+ guard = Guard::Konacha.new([], :spec_dir => 'spec/mocha')
+ guard.instance_variable_get(:@spec_dir).should eq('spec/mocha')
+ end
+ end
+end
View
@@ -0,0 +1,4 @@
+require 'rspec'
+require 'guard/konacha'
+
+ENV["GUARD_ENV"] = 'test'

0 comments on commit 241b54b

Please sign in to comment.