rspectacular 0.9.1 → 0.9.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rspectacular/plugins/timecop.rb +10 -7
- data/lib/rspectacular/version.rb +1 -1
- metadata +1 -1
@@ -1,11 +1,14 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
require 'timecop'
|
1
|
+
begin
|
2
|
+
require 'timecop'
|
4
3
|
|
5
|
-
|
6
|
-
|
4
|
+
RSpec.configure do |config|
|
5
|
+
config.around(:each, :time_mock => true) do |example|
|
6
|
+
Timecop.freeze(Time.utc(2012, 7, 26, 18, 0, 0))
|
7
|
+
|
8
|
+
example.run
|
7
9
|
|
8
|
-
|
9
|
-
|
10
|
+
Timecop.return
|
11
|
+
end
|
10
12
|
end
|
13
|
+
rescue LoadError
|
11
14
|
end
|
data/lib/rspectacular/version.rb
CHANGED