Skip to content
This repository has been archived by the owner on Aug 25, 2021. It is now read-only.

Commit

Permalink
Fixed failed spec in spec_helper
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Scott authored and Brian Scott committed May 18, 2013
1 parent ecc0766 commit 5940e4f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
14 changes: 10 additions & 4 deletions spec/chef-rundeck_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
require 'spec_helper'

describe "ChefRundeck" do
it "should respond to GET" do
get '/'
describe 'ChefRundeck' do

it 'should return false' do
ChefRundeck.new
ChefRundeck.config_file = "#{ENV['TRAVIS_BUILD_DIR']}/spec/support/client.rb"

get '/'
last_response.should be_ok
end

end
12 changes: 6 additions & 6 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
$LOAD_PATH.unshift(File.dirname(__FILE__))
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require 'chef-rundeck'
require 'sinatra'
require 'rspec'
require 'rspec/autorun'
require 'rack/test'

# setup test environment
# set :environment, :test
# set :run, false
# set :raise_errors, true
# set :logging, false

set :environment, :test
set :run, false
set :raise_errors, true
set :logging, false

def app
ChefRundeck.new
ChefRundeck.config_file("#{ENV['TRAVIS_BUILD_DIR']}/spec/support/client.rb")
end

RSpec.configure do |config|
Expand Down
2 changes: 1 addition & 1 deletion spec/support/client.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
log_level :info
log_location STDOUT
chef_server_url "https://api.opscode.com/organizations/chef-rundeck"
client_key ENV["TRAVIS_BUILD_DIR"] + "/spec/support/travis.pem"
client_key "#{ENV["TRAVIS_BUILD_DIR"]}" + "/spec/support/travis.pem"
node_name "travis"

0 comments on commit 5940e4f

Please sign in to comment.