Skip to content

Commit

Permalink
Bundle update
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Elliott and Taylor Mock authored and hashrocketeer committed May 6, 2014
1 parent 37d066d commit 1e20b8b
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 43 deletions.
2 changes: 2 additions & 0 deletions Gemfile
Expand Up @@ -5,4 +5,6 @@ ruby '2.1.1'

gemspec

gem 'configuration'
gem 'pry'
gem 'rspec'
30 changes: 19 additions & 11 deletions Gemfile.lock
Expand Up @@ -7,31 +7,39 @@ PATH
GEM
remote: https://rubygems.org/
specs:
activemodel (3.0.9)
activesupport (= 3.0.9)
activemodel (3.0.20)
activesupport (= 3.0.20)
builder (~> 2.1.2)
i18n (~> 0.5.0)
activeresource (3.0.9)
activemodel (= 3.0.9)
activesupport (= 3.0.9)
activesupport (3.0.9)
activeresource (3.0.20)
activemodel (= 3.0.20)
activesupport (= 3.0.20)
activesupport (3.0.20)
builder (2.1.2)
coderay (1.1.0)
configuration (1.2.0)
i18n (0.5.0)
configuration (1.3.4)
diff-lcs (1.2.5)
i18n (0.5.3)
method_source (0.8.2)
pry (0.9.12.6)
coderay (~> 1.0)
method_source (~> 0.8)
slop (~> 3.4)
rspec (1.3.0)
rspec (2.14.1)
rspec-core (~> 2.14.0)
rspec-expectations (~> 2.14.0)
rspec-mocks (~> 2.14.0)
rspec-core (2.14.8)
rspec-expectations (2.14.5)
diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.14.6)
slop (3.5.0)

PLATFORMS
ruby

DEPENDENCIES
configuration (~> 1.2.0)
configuration
pry
rspec (~> 1.3.0)
rspec
slurper!
18 changes: 3 additions & 15 deletions Rakefile
@@ -1,20 +1,8 @@
require 'rubygems'
require 'rake'

require 'spec/rake/spectask'
Spec::Rake::SpecTask.new(:spec) do |spec|
spec.libs << 'lib' << 'spec'
spec.spec_files = FileList['spec/**/*_spec.rb']
end

Spec::Rake::SpecTask.new(:rcov) do |spec|
spec.libs << 'lib' << 'spec'
spec.pattern = 'spec/**/*_spec.rb'
spec.rcov = true
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec) do |spec|
spec.pattern = "spec/**/*_spec.rb"
end

task :spec

task :default => :spec

require 'rdoc/task'
Expand Down
3 changes: 0 additions & 3 deletions slurper.gemspec
Expand Up @@ -34,7 +34,4 @@ Gem::Specification.new do |gem|
]

gem.add_dependency("activeresource", ["~> 3.0.9"])
gem.add_development_dependency("rspec", ["~> 1.3.0"])
gem.add_development_dependency("configuration", ["~> 1.2.0"])

end
4 changes: 1 addition & 3 deletions spec/slurper_spec.rb
@@ -1,6 +1,4 @@
require 'rubygems'
require 'spec'
require 'slurper'
require 'spec_helper'

describe Slurper do

Expand Down
11 changes: 11 additions & 0 deletions spec/spec_helper.rb
@@ -0,0 +1,11 @@
require 'bundler'

Bundler.require(:default, :development)

# Requires supporting files with custom matchers and macros, etc,
# in ./support/ and its subdirectories.
Dir[File.expand_path(File.join(File.dirname(__FILE__),'support','**','*.rb'))].each {|f| require f}

RSpec.configure do |config|
config.mock_with :rspec
end
20 changes: 9 additions & 11 deletions spec/story_spec.rb
@@ -1,20 +1,18 @@
require 'rubygems'
require 'spec'
require 'slurper'
require 'spec_helper'

describe Story do

context "#prepare" do
it "scrubs the description" do
story = Story.new
story.stub!(:default_requested_by)
story.stub(:default_requested_by)
story.should_receive(:scrub_description)
story.prepare
end

it "scrubs the defaults the requested_by attribute" do
story = Story.new
story.stub!(:scrub_description)
story.stub(:scrub_description)
story.should_receive(:default_requested_by)
story.prepare
end
Expand All @@ -37,21 +35,21 @@

context "requested_by attribute" do
it "uses the default if not given one" do
Story.stub!(:config).and_return({"requested_by" => "Mr. Client"})
Story.stub(:config).and_return({"requested_by" => "Mr. Client"})
story = Story.new
story.send(:default_requested_by)
story.requested_by.should == "Mr. Client"
end

it "uses the default if given a blank requested_by" do
Story.stub!(:config).and_return({"requested_by" => "Mr. Client"})
Story.stub(:config).and_return({"requested_by" => "Mr. Client"})
story = Story.new(:requested_by => "")
story.send(:default_requested_by)
story.requested_by.should == "Mr. Client"
end

it "uses the name given in the story file if there is one" do
Story.stub!(:config).and_return({"requested_by" => "Mr. Client"})
Story.stub(:config).and_return({"requested_by" => "Mr. Client"})
story = Story.new(:requested_by => "Mr. Stakeholder")
story.send(:default_requested_by)
story.requested_by.should == "Mr. Stakeholder"
Expand Down Expand Up @@ -83,9 +81,9 @@

it "when it is full of whitespace" do
desc = <<-STRING
In order to do something
As a role
I want to click a thingy
In order to do something
As a role
I want to click a thingy
STRING
story = Story.new(:description => desc)
story.send(:scrub_description)
Expand Down

0 comments on commit 1e20b8b

Please sign in to comment.