If you are running a rails app with nginx serving it up and you want to put the whole shebang into development mode, open up your nginx.conf file and in the server section, add the following line:
rails_env development;
Remember though, it takes a ton more resource to do this so remove the line when you're done.
Part of the fun of doing this is if you are hacking away on a project and you want to skip the precompiling of assets and such.
What do you do when you love your spec testing with Capybara but you want to veer off the beaten path of Rspec and forge ahead into MiniTest waters? Follow along, and you'll have not one, but two working solutions. The setup Quickly now, let's throw together an app to test this out. I'm on rails 3.2.9. $ rails new minicap Edit the Gemfile to include a test and development block group :development, :test do gem 'capybara' gem 'database_cleaner' end Note the inclusion of database_cleaner as per the capybara documentation And bundle: $ bundle We will, of course, need something to test against, so for the sake of it, lets throw together a scaffold, migrate our database and prepare our test database all in one big lump. If you are unclear on any of this, go read the guides . $ rails g scaffold Book name:string author:string $ rake db:migrate $ rake db:test:prepare Make it minitest To make rails use minitest , we simply add a require ...
Comments
Post a Comment