Sha256: a45637b7fb9be6e8e29704f6a70bdb8eb9dbeb5b4487002d01add69457df060c

Contents?: true

Size: 878 Bytes

Versions: 1

Compression:

Stored size: 878 Bytes

Contents

require "spec_helper"

describe "Hisyo::Generator assistance" do
  context "travis" do
    let(:kind) { "travis" }
    include_context "assistance"

    it "should create .travis.yml " do
      File.exists?("#{@approot}/.travis.yml").should be_true
      yml = YAML.load File.read("#{@approot}/.travis.yml")
      yml["notifications"]["email"].should_not be_empty
    end
  end

  context "sprockets" do
    let(:kind) { "sprockets" }
    include_context "assistance"

    it "should get under the /assets" do
      genapp do
        get "/assets/app.js"
        last_response.body.should =~ /sprockets/
      end
    end

    it "should compile by Rake" do
      approot = @approot
      capture_io do
        rake do
          tasks.find{|t| t.name == "assets"}.execute
        end
      end
      Dir.entries("#{approot}/public/assets").should_not be_empty
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hisyo-0.2.0 spec/generate_assistance_spec.rb