Sha256: 12380dc7486cb3aa2505ed80ee003f80ca540e82c8a79c779993dafd188052a9
Contents?: true
Size: 1.35 KB
Versions: 14
Compression:
Stored size: 1.35 KB
Contents
require File.expand_path("#{File.dirname(__FILE__)}/../unit_spec_helper") module JsTestCore describe RailsServer do it "subclasses Server" do RailsServer.superclass.should == Server end describe ".run" do attr_reader :rails_root before do @rails_root = "/rails/root" Server.instance = nil end it "initializes the RailsServer and runs the Thin Handler and sets Server.instance to the RailsServer instance" do host = DEFAULT_HOST port = DEFAULT_PORT server_instance = nil mock.proxy(RailsServer).new( rails_root, host, port ) do |new_instance| server_instance = new_instance end mock(EventMachine).run.yields mock(EventMachine).start_server(host, port, ::Thin::JsTestCoreConnection) RailsServer.run(rails_root) Server.instance.should == server_instance end end describe "#initialize" do it "sets the server paths based on the passed in rails root" do rails_root = "/rails/root" server = RailsServer.new(rails_root) server.spec_root_path.should == "#{rails_root}/spec/javascripts" server.implementation_root_path.should == "#{rails_root}/public/javascripts" server.public_path.should == "#{rails_root}/public" end end end end
Version data entries
14 entries across 14 versions & 7 rubygems