http_stub 0.9.1 → 0.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -15,6 +15,7 @@ module HttpStub
15
15
  desc "Starts stub #{options[:name]}"
16
16
  task "start_#{options[:name]}" do
17
17
  HttpStub::Server.instance_eval do
18
+ set :environment, :test
18
19
  set :port, options[:port]
19
20
  run!
20
21
  end
@@ -1,3 +1,3 @@
1
1
  module HttpStub
2
- VERSION = "0.9.1"
2
+ VERSION = "0.9.2"
3
3
  end
@@ -2,13 +2,14 @@ describe HttpStub::Rake::ServerTasks do
2
2
 
3
3
  describe "the configure task" do
4
4
 
5
+ let(:default_options) { { port: 8001 } }
6
+
7
+ before(:each) { HttpStub::Rake::ServerTasks.new(default_options.merge(options)) }
8
+
5
9
  context "when a configurer is provided" do
6
10
 
7
11
  let(:configurer) { double(HttpStub::Configurer) }
8
-
9
- before(:each) do
10
- HttpStub::Rake::ServerTasks.new(name: :tasks_configurer_provided_test, port: 8001, configurer: configurer)
11
- end
12
+ let(:options) { { name: :tasks_configurer_provided_test, configurer: configurer } }
12
13
 
13
14
  context "and the task is executed" do
14
15
 
@@ -24,7 +25,7 @@ describe HttpStub::Rake::ServerTasks do
24
25
 
25
26
  context "when a configurer is not provided" do
26
27
 
27
- before(:each) { HttpStub::Rake::ServerTasks.new(name: :tasks_configurer_not_provided_test, port: 8001) }
28
+ let(:options) { { name: :tasks_configurer_not_provided_test } }
28
29
 
29
30
  it "should not generate a task" do
30
31
  lambda { Rake::Task[:configure_tasks_configurer_not_provided_test] }.should
data/spec/spec_helper.rb CHANGED
@@ -2,7 +2,7 @@ require 'simplecov'
2
2
  SimpleCov.start do
3
3
  add_filter "/spec/"
4
4
  add_filter "/vendor/"
5
- minimum_coverage 98.31
5
+ minimum_coverage 98.1
6
6
  refuse_coverage_drop
7
7
  end if ENV["coverage"]
8
8
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: http_stub
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.9.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-09-23 00:00:00.000000000 Z
13
+ date: 2013-10-03 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: sinatra
@@ -324,7 +324,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
324
324
  version: '0'
325
325
  segments:
326
326
  - 0
327
- hash: -682079675256504767
327
+ hash: 3783523882870013849
328
328
  requirements: []
329
329
  rubyforge_project: http_stub
330
330
  rubygems_version: 1.8.25