I adapted the first lines of service_spec.rb according to Jason’s code:
require File.dirname(FILE) + ‘/…/service’
require ‘rspec’ # was ‘spec’ (Jason) #require ‘spec/interop/test’ # no idea what this was
require ‘test/unit’ # gem install test-unit
set :environment, :test
Test::Unit::TestCase.send :include, Rack::Test::Methods
RSpec.configure do |conf| #from Jason
Also needed to replace
ruby service.rb -p 3000
seems to work but
telnet locahost 3000 never connects
Ok, I’ve updated the code examples in Chapter 1 to use the latest gem
versions. Also, I’ve included a gemfile so going forward new gem
versions shouldn’t break anything. You’ll just be able to bundle
install to get the right ones.
README for chapter 1 code:
I’ll be updating the other code examples more today and in the coming
week. Let me know if there are any issues.
jtanium wrote in post #964516:
I’m a long time Ruby and Rails user, but new to RSpec; I’ve been using
I picked up the book “Service-Oriented Design with Ruby and
Rails” (Amazon.com) which uses RSpec throughout. Despite
being published only a few months ago, it’s already out of date.