From cda2970286b8eef3aafcda2a8bd9412111ec866e Mon Sep 17 00:00:00 2001 From: Morgan Christiansson Date: Tue, 21 Feb 2012 11:32:12 +0000 Subject: [PATCH] fix rspec --- Gemfile | 10 ++++------ Gemfile.lock | 24 +++++++++++++++--------- lib/ruby-postcodeanywhere.rb | 3 ++- spec/ruby-postcodeanywhere_spec.rb | 4 ++-- spec/spec_helper.rb | 12 ++++-------- 5 files changed, 27 insertions(+), 26 deletions(-) diff --git a/Gemfile b/Gemfile index f68cf0f..2436034 100644 --- a/Gemfile +++ b/Gemfile @@ -1,14 +1,12 @@ source "http://rubygems.org" -# Add dependencies required to use your gem here. -# Example: -# gem "activesupport", ">= 2.3.5" gem "httparty" -# Add dependencies to develop your gem here. -# Include everything needed to run rake, tests, features, etc. +gem "activesupport" +gem "i18n" + group :development do - gem "rspec", "~> 2.3.0" + gem "rspec" gem "bundler" gem "jeweler", "~> 1.6.2" gem "rcov", ">= 0" diff --git a/Gemfile.lock b/Gemfile.lock index 5e94030..123d474 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,32 +1,38 @@ GEM remote: http://rubygems.org/ specs: + activesupport (3.1.1) + multi_json (~> 1.0) crack (0.1.8) - diff-lcs (1.1.2) + diff-lcs (1.1.3) git (1.2.5) httparty (0.7.8) crack (= 0.1.8) + i18n (0.6.0) jeweler (1.6.2) bundler (~> 1.0) git (>= 1.2.5) rake + multi_json (1.0.4) rake (0.9.2) rcov (0.9.9) - rspec (2.3.0) - rspec-core (~> 2.3.0) - rspec-expectations (~> 2.3.0) - rspec-mocks (~> 2.3.0) - rspec-core (2.3.1) - rspec-expectations (2.3.0) + rspec (2.8.0) + rspec-core (~> 2.8.0) + rspec-expectations (~> 2.8.0) + rspec-mocks (~> 2.8.0) + rspec-core (2.8.0) + rspec-expectations (2.8.0) diff-lcs (~> 1.1.2) - rspec-mocks (2.3.0) + rspec-mocks (2.8.0) PLATFORMS ruby DEPENDENCIES + activesupport bundler httparty + i18n jeweler (~> 1.6.2) rcov - rspec (~> 2.3.0) + rspec diff --git a/lib/ruby-postcodeanywhere.rb b/lib/ruby-postcodeanywhere.rb index e63c86f..164233a 100644 --- a/lib/ruby-postcodeanywhere.rb +++ b/lib/ruby-postcodeanywhere.rb @@ -1,4 +1,5 @@ require 'httparty' +require 'active_support/core_ext/module/attribute_accessors' module PostcodeAnywhere @@ -137,4 +138,4 @@ class AddressListItem end -end \ No newline at end of file +end diff --git a/spec/ruby-postcodeanywhere_spec.rb b/spec/ruby-postcodeanywhere_spec.rb index 938f12e..33f4e5c 100644 --- a/spec/ruby-postcodeanywhere_spec.rb +++ b/spec/ruby-postcodeanywhere_spec.rb @@ -1,6 +1,6 @@ -require File.expand_path(File.dirname(__FILE__) + '/spec_helper') +require 'spec_helper' -describe "RubyPostcodeanywhere" do +describe PostcodeAnywhere do it "fails" do fail "hey buddy, you should probably rename this file and start specing for real" end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index a5bafa7..3aebd96 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,12 +1,8 @@ -$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) -$LOAD_PATH.unshift(File.dirname(__FILE__)) -require 'rspec' -require 'ruby-postcodeanywhere' +require 'rubygems' +require 'bundler/setup' -# Requires supporting files with custom matchers and macros, etc, -# in ./support/ and its subdirectories. -Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f} +require 'ruby-postcodeanywhere' RSpec.configure do |config| - end +