Groups
Groups
Sign in
Groups
Groups
rspec
Conversations
About
Send feedback
Help
How to set HTTP Headers with Rspec3 ??
47 views
Skip to first unread message
AndyL
unread,
Jun 2, 2014, 4:44:01 PM
6/2/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to rs...@googlegroups.com
To test subdomains in rspec2, I used a line like 'request.host = "#{@subdomain}.
testdomain.com
" ' in a before(:each) clause.
With rspec3, it looks like there is no request object. How can I setup custom subdomains using rspec3 ??
AndyL
unread,
Jun 2, 2014, 8:42:02 PM
6/2/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to rs...@googlegroups.com
I was able to work around this problem by adding ':type => :controller' to my controller specs. Now everything works as before.
BTW - the problem spec resided under the "spec/controllers" directory. In rspec2 the ':type => :controller' parameter was set automatically.
AndyL
unread,
Jun 2, 2014, 9:26:58 PM
6/2/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to rs...@googlegroups.com
Another note - had to add ":type => :view" and ":type => :feature" to get view and feature specs working.
Using Rails 4.0 and Ruby 2.1.1
AndyL
unread,
Jun 3, 2014, 11:49:37 AM
6/3/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to rs...@googlegroups.com
So I just read the release notes, and learned that I needed to use this setting...
config
.
infer_spec_type_from_file_location!
Reply all
Reply to author
Forward
0 new messages