+ Upgrades our code to a recent rspec

This commit is contained in:
Kaspar Schiess 2010-12-30 13:46:06 +01:00
parent 36904e208a
commit 9a0da07f73
4 changed files with 7 additions and 7 deletions

View file

@ -5,6 +5,6 @@ gem 'hoe-git'
group :development do
gem 'metaid'
gem 'rspec'
gem 'rspec', '~> 2.0'
gem 'flexmock'
end

View file

@ -26,4 +26,4 @@ DEPENDENCIES
hoe
hoe-git
metaid
rspec
rspec (~> 2.0)

View file

@ -1,6 +1,5 @@
require 'net/ldap'
require 'rubygems'
Spec::Runner.configure do |config|
RSpec.configure do |config|
config.mock_with :flexmock
end

View file

@ -4,12 +4,13 @@ require 'net/ber'
require 'net/ldap'
describe "BER encoding of" do
def properly_encode_and_decode
simple_matcher('properly encode and decode') do |given|
RSpec::Matchers.define :properly_encode_and_decode do
match do |given|
given.to_ber.read_ber.should == given
end
end
context "arrays" do
it "should properly encode/decode []" do
[].should properly_encode_and_decode