How to set subdomain in rails rspec

May 4, 2015

context "subdomain test" do
  it "should return subdomain" do
    request.host = "subdomain." + request.host
    expect(get_subdomain).to eq("subdomain")
  end
end