Sha256: 1b39e6a8f4b8523eb72cc2f56e673c3ba21edb9da41feaa0948652afd34aeb8f

Contents?: true

Size: 555 Bytes

Versions: 1

Compression:

Stored size: 555 Bytes

Contents

require "spec_helper"

describe "Hisyo.generate_project" do
  before(:each) do
    Hisyo.generate_project(
      :root => @approot,
    )
    @mock = Class.new
    configru = "#{@approot}/config.ru"
    @mock.class_eval do
      include Rack::Test::Methods
      RU = configru
      def app
        Rack::Builder.parse_file(RU).first
      end
    end
  end

  after(:each) do
    system("rm -rf #{@approot}")
  end

  it "should rackup" do
    @mock.new.instance_eval do
      get "/"
      last_response.body.should == "Hello, MyApp!"
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hisyo-0.0.3 spec/generated_app_spec.rb