factory_toys 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/factory_toys.gemspec +1 -1
- data/lib/factory_toys.rb +1 -1
- data/spec/factory_toys_spec.rb +15 -0
- data/tmp/features/simple_factory.feature +1 -1
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.2
|
data/factory_toys.gemspec
CHANGED
data/lib/factory_toys.rb
CHANGED
@@ -36,7 +36,7 @@ module FactoryToys
|
|
36
36
|
end
|
37
37
|
|
38
38
|
def update_required(file, output_file)
|
39
|
-
File.open(output_file) {|f| return "# last update: #{File.mtime(file)}" != f.readline}
|
39
|
+
File.open(output_file) {|f| return "# last update: #{File.mtime(file)}\n" != f.readline}
|
40
40
|
rescue
|
41
41
|
true
|
42
42
|
end
|
data/spec/factory_toys_spec.rb
CHANGED
@@ -67,7 +67,22 @@ describe "FactoryToys" do
|
|
67
67
|
FileUtils.rm_r(FactoryToys.features_location + '/*', :force => true)
|
68
68
|
FactoryToys.update_features
|
69
69
|
end
|
70
|
+
|
71
|
+
it 'does not override file if no change' do
|
72
|
+
Object.send(:remove_const, :RAILS_ROOT)
|
73
|
+
path = File.dirname(__FILE__)
|
74
|
+
path += Dir.pwd + '/' unless path[0..0] == '/'
|
75
|
+
Object.const_set(:RAILS_ROOT, path + '/../tmp')
|
76
|
+
FileUtils.rm_r(FactoryToys.features_location + '/*', :force => true)
|
77
|
+
FactoryToys.update_features
|
78
|
+
init_files = Dir.glob(FactoryToys.features_location + '/*.feature').map{|f| [f, File.open(f){|file| file.read}]}
|
79
|
+
FactoryToys.update_features
|
80
|
+
new_files = Dir.glob(FactoryToys.features_location + '/*.feature').map{|f| [f, File.open(f){|file| file.read}]}
|
81
|
+
|
82
|
+
init_files.first.last.should == new_files.first.last
|
83
|
+
end
|
70
84
|
end
|
85
|
+
|
71
86
|
end
|
72
87
|
|
73
88
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# last update: Wed Sep 15 18:00:01 +0100 2010
|
2
2
|
# Auto Generated Features
|
3
|
-
# Generated: Tue Oct 05 14:
|
3
|
+
# Generated: Tue Oct 05 14:45:43 +0100 2010
|
4
4
|
# Source File: /Users/tom025/rails/factory-toys/spec/../tmp/ffactories/simple_factory.rb
|
5
5
|
|
6
6
|
Test Instruction Queue and Processiung
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: factory_toys
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 11
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 4
|
9
|
-
-
|
10
|
-
version: 0.4.
|
9
|
+
- 2
|
10
|
+
version: 0.4.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- David Henry
|