Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

use latest rspec, fix requires

  • Loading branch information...
commit 29bd627721f3f1d9aa44dd655e02182045876227 1 parent 351ef23
@igrigorik authored
View
2  dubious.gemspec
@@ -30,6 +30,6 @@ Gem::Specification.new do |s|
s.add_dependency("mirah_model", "0.0.2")
s.add_dependency("appengine-sdk", "~> 1.4.0")
- s.add_development_dependency("rspec", "2.4.0")
+ s.add_development_dependency("rspec")
s.add_development_dependency("mocha", "0.9.12")
end
View
8 spec/dubious/action_controller_spec.rb
@@ -1,15 +1,15 @@
-require File.dirname(__FILE__)+'/../spec_helper.rb'
+require 'spec_helper'
describe Dubious::ActionController do
subject { Dubious::ActionController.new }
it { should respond_to :do_get }
-
+
describe "#do_get" do
let(:req) { HttpServletRequest.new }
let(:resp){ HttpServletResponse.new }
it {
- req.stubs :get_path_info => '/somepath',
+ req.stubs :get_path_info => '/somepath',
:get_servlet_path => '/someotherpath',
:get_parameter => nil
resp.expects(:set_status).with 404
@@ -19,6 +19,6 @@
end
describe "#action_request" do
-
+
end
end
View
18 spec/dubious_cli_spec.rb
@@ -1,12 +1,13 @@
-require File.dirname(__FILE__)+'/../lib/dubious/cli'
+require 'spec_helper'
+require 'dubious/cli'
describe Dubious::CLI do
-
- before :each do
+
+ before :each do
FileUtils.rm_rf 'spec/temp'
Dir.mkdir 'spec/temp'
end
-
+
describe "subcommands" do
subject { Dubious::CLI::Main.subcommands }
it { should include 'new' }
@@ -14,21 +15,18 @@
end
describe Dubious::CLI::Generator do
-
it 'expects a name' do
lambda {
- Dubious::CLI::Generator.new
+ Dubious::CLI::Generator.new
}.should raise_error
end
-
+
describe "#model" do
it '...' do
- generator = Dubious::CLI::Generator.new(['something'],:quiet=>true)
+ generator = Dubious::CLI::Generator.new(['something'], :quiet=>true)
generator.destination_root=File.dirname(__FILE__)+'/temp'
generator.model
end
end
-
-
end
end
View
8 spec/spec_helper.rb
@@ -1,14 +1,13 @@
require 'java'
require 'bundler/setup'
+require 'rspec/core'
require 'mirah'
require 'appengine-sdk'
-require 'rspec/core'
require 'mocha'
-
require AppEngine::SDK::SDK_ROOT + '/lib/shared/servlet-api.jar'
-require File.dirname(__FILE__)+'/../lib/dubious.jar'
-require File.dirname(__FILE__)+'/../javalib/mirahdatastore.jar'
+require File.dirname(__FILE__) + '/../lib/dubious.jar'
+require File.dirname(__FILE__) + '/../javalib/mirahdatastore.jar'
import javax.servlet.http.HttpServletRequest
import javax.servlet.http.HttpServletResponse
@@ -17,7 +16,6 @@
import javax.servlet.FilterChain
import javax.servlet.FilterConfig
-
RSpec.configure do |config|
config.mock_with :mocha
end
Please sign in to comment.
Something went wrong with that request. Please try again.