Rename spec wrapper classes to prevent cross-pollination of specs. Require rspec 1.1.4 or later to fix the "describe Module do" bug
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668954 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/rb/spec/binaryprotocol_spec.rb b/lib/rb/spec/binaryprotocol_spec.rb
index c3ad5e1..c152d2a 100644
--- a/lib/rb/spec/binaryprotocol_spec.rb
+++ b/lib/rb/spec/binaryprotocol_spec.rb
@@ -1,7 +1,7 @@
require File.dirname(__FILE__) + '/spec_helper'
require 'thrift/protocol/binaryprotocol'
-class ThriftSpec < Spec::ExampleGroup
+class ThriftBinaryProtocolSpec < Spec::ExampleGroup
include Thrift
describe BinaryProtocol do
diff --git a/lib/rb/spec/client_spec.rb b/lib/rb/spec/client_spec.rb
index f8e86e4..b92bbec 100644
--- a/lib/rb/spec/client_spec.rb
+++ b/lib/rb/spec/client_spec.rb
@@ -1,6 +1,6 @@
require File.dirname(__FILE__) + '/spec_helper'
-class ThriftSpec < Spec::ExampleGroup
+class ThriftClientSpec < Spec::ExampleGroup
include Thrift
class ClientSpec
@@ -12,7 +12,7 @@
@client = ClientSpec.new(@prot)
end
- describe "Client" do
+ describe Client do
it "should re-use iprot for oprot if not otherwise specified" do
@client.instance_variable_get(:'@iprot').should eql(@prot)
@client.instance_variable_get(:'@oprot').should eql(@prot)
diff --git a/lib/rb/spec/exception_spec.rb b/lib/rb/spec/exception_spec.rb
index 013f612..bbcf5e8 100644
--- a/lib/rb/spec/exception_spec.rb
+++ b/lib/rb/spec/exception_spec.rb
@@ -1,6 +1,6 @@
require File.dirname(__FILE__) + '/spec_helper'
-class ThriftSpec < Spec::ExampleGroup
+class ThriftExceptionSpec < Spec::ExampleGroup
include Thrift
describe Exception do
diff --git a/lib/rb/spec/processor_spec.rb b/lib/rb/spec/processor_spec.rb
index 24440e4..6bf2a45 100644
--- a/lib/rb/spec/processor_spec.rb
+++ b/lib/rb/spec/processor_spec.rb
@@ -1,6 +1,6 @@
require File.dirname(__FILE__) + '/spec_helper'
-class ThriftSpec < Spec::ExampleGroup
+class ThriftProcessorSpec < Spec::ExampleGroup
include Thrift
class ProcessorSpec
diff --git a/lib/rb/spec/protocol_spec.rb b/lib/rb/spec/protocol_spec.rb
index 6c08c43..0dbe869 100644
--- a/lib/rb/spec/protocol_spec.rb
+++ b/lib/rb/spec/protocol_spec.rb
@@ -1,6 +1,6 @@
require File.dirname(__FILE__) + '/spec_helper'
-class ThriftSpec < Spec::ExampleGroup
+class ThriftProtocolSpec < Spec::ExampleGroup
include Thrift
before(:each) do
diff --git a/lib/rb/spec/spec_helper.rb b/lib/rb/spec/spec_helper.rb
index fc15741..0c7136b 100644
--- a/lib/rb/spec/spec_helper.rb
+++ b/lib/rb/spec/spec_helper.rb
@@ -1,4 +1,6 @@
require 'rubygems'
+# require at least 1.1.4 to fix a bug with describing Modules
+gem 'rspec', '>= 1.1.4'
require 'spec'
# turn on deprecation so we can test it