Thank you Shalon!

To clarify to everyone, you, of course, need to use example.org
instead though as your test domain. So you could do:

def valid_site_attributes(options = {})
  {
    :domain => 'http://www.example.org',
    :folder => 'exampleorg',
    :subdomain => 'example',
    :active => true,
    :id => 1
  }.merge(options)
end

 given "current_site" do
  Site.all.destroy!
  @current_site = Site.create(valid_site_attributes)
end

  describe "/payment", :given => 'current_site' do
    before(:each) do
      @response = request("http://example.example.org/payment";)
    end

    it "should respond successfully" do
      @response.should be_successful
    end
  end


And that will be green :)


On Mar 17, 8:07 am, Shalon Wood <[email protected]> wrote:
> Just use a full url:
>
>       response = 
> request("http://playground.playground.pele.cx/blogposts/show/1";, :method => 
> "GET")
>
> Shalon Wood
>
>
>
>
>
> scottmotte <[email protected]> writes:
> > This is something I'd love to know as well. I tried many different
> > combinations a month ago but with no success.Atmosmentions it is
> > possible, but after searching code source on github I haven't been
> > able to find any example usage of it.
>
> >http://atmos.org/index.php/2008/11/29/merb-10-controller-testing/
>
> > On Mar 17, 12:51 am, Peter <[email protected]> wrote:
> >> Hello,
>
> >> Please how can I change in my test the default domain "example.org" ?
>
> >> I tried this request['HTTP_HOST'] = "test.example.org" in my before
> >> (:each) do but it's not working.
>
> >> wrong number of arguments (0 for 1)
>
> >> Thanks,
>
> >> Peter.
>
> --
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"merb" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/merb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to