spex 0.7.1 → 0.7.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.7.1
1
+ 0.7.2
@@ -16,10 +16,10 @@ module Spex
16
16
  def after
17
17
  if active?
18
18
  assert File.exist?(target), "File was not created at #{target}"
19
+ check_type
19
20
  else
20
21
  assert !File.exist?(target), "File was created at #{target}"
21
22
  end
22
- check_type
23
23
  end
24
24
 
25
25
  private
@@ -8,12 +8,18 @@ module Spex
8
8
  example "Directory was removed", "check '/tmp/foo', :removed => {:type => 'directory'}"
9
9
 
10
10
  def before
11
- assert File.exist?(target), "File does not exist at #{target}"
12
- check_type
11
+ if active?
12
+ assert File.exist?(target), "File does not exist at #{target}"
13
+ check_type
14
+ end
13
15
  end
14
16
 
15
17
  def after
16
- assert !File.exist?(target), "File still exists at #{target}"
18
+ if active?
19
+ assert !File.exist?(target), "File still exists at #{target}"
20
+ else
21
+ assert File.exist?(target), "File was removed from #{target}"
22
+ end
17
23
  end
18
24
 
19
25
  private
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 7
8
- - 1
9
- version: 0.7.1
8
+ - 2
9
+ version: 0.7.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Bruce Williams