scenario 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -187,6 +187,7 @@ to be read once.
187
187
  Version History
188
188
  ===============
189
189
 
190
+ * 0.3.2 - Explicitly require RSpec.
190
191
  * 0.3.1 - Add "setup" syntax.
191
192
  * 0.3.0 - Remove support for module-based scenarios, allow calling RSpec hooks
192
193
  in scenarios.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.1
1
+ 0.3.2
@@ -1,5 +1,11 @@
1
1
  $: << File.expand_path( File.dirname( __FILE__ ) )
2
2
 
3
+ begin
4
+ require "rspec"
5
+ rescue LoadError
6
+ require "spec"
7
+ end
8
+
3
9
  require 'scenario/fixtures'
4
10
  require 'scenario/scenario'
5
11
  require 'scenario/rspec'
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{scenario}
8
- s.version = "0.3.1"
8
+ s.version = "0.3.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Tyson Tate"]
12
- s.date = %q{2011-05-23}
12
+ s.date = %q{2011-05-24}
13
13
  s.description = %q{Basic spec scenarios for RSpec. Also includes basic fixtures support.}
14
14
  s.email = %q{tyson@tysontate.com}
15
15
  s.extra_rdoc_files = [
@@ -115,13 +115,15 @@ describe "Shared example groups" do
115
115
  it_should_behave_like "without scenario in the shared group"
116
116
  end
117
117
 
118
- context "with scenario in shared group" do
119
- it_should_behave_like "with scenario in the shared group"
120
-
121
- it "shouldn't leak" do
122
- @scenario_all.should be_nil
123
- @scenario_each.should be_nil
124
- lambda { scenario_method }.should raise_error
118
+ if $rspec2
119
+ context "with scenario in shared group" do
120
+ it_should_behave_like "with scenario in the shared group"
121
+
122
+ it "shouldn't leak" do
123
+ @scenario_all.should be_nil
124
+ @scenario_each.should be_nil
125
+ lambda { scenario_method }.should raise_error
126
+ end
125
127
  end
126
128
  end
127
129
  end
@@ -3,8 +3,12 @@ $LOAD_PATH.unshift( File.join( File.dirname( __FILE__ ), '..', 'lib' ) )
3
3
  begin
4
4
  # 2.x
5
5
  require 'rspec'
6
+ $rspec1 = false
7
+ $rspec2 = true
6
8
  rescue LoadError
7
9
  # 1.x
8
10
  require 'spec'
11
+ $rspec1 = true
12
+ $rspec2 = false
9
13
  end
10
14
  require 'scenario'
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scenario
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 1
10
- version: 0.3.1
9
+ - 2
10
+ version: 0.3.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Tyson Tate
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-05-23 00:00:00 -07:00
18
+ date: 2011-05-24 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency