Sha256: bfd0a4bcc1c367aa5dfe381c888e6b78e8260c1a3e514b34bf1a990b5ecb5524
Contents?: true
Size: 928 Bytes
Versions: 8
Compression:
Stored size: 928 Bytes
Contents
# encoding: utf-8 require File.dirname(__FILE__) + "/integration_helper" require "locomotive/builder/server" require "rack/test" describe Locomotive::Builder::Server do include Rack::Test::Methods def app clone_site reader = Locomotive::Mounter::Reader::FileSystem.instance reader.run!(path: "site") Locomotive::Builder::Server.new(reader) end it "shows the index page" do get '/' last_response.body.should =~ /Content of the home page/ end it "shows the 404 page" do get '/void' last_response.body.should =~ /Content of the 404 page/ end it "shows content" do get '/products/latest' last_response.body.should =~ /The name of the latest product is: Useless stuff/ end it "translates strings" do get '/en/translated' last_response.body.should =~ /Hello world!/ get '/es/translated' last_response.body.should =~ /¡Hola, Mundo!/ end end
Version data entries
8 entries across 8 versions & 1 rubygems