Displaying 2 results from an estimated 2 matches for "unsafebuilding".
2011 May 25
1
rake task: uninitialized constant
...te_string)
begin
day, month, year = date_string.split("-")
Time.mktime(year, CUSTOM_MONTHS.index(month), day).strftime("%Y-%m-%d")
rescue
return nil
end
end
namespace :import do
desc ''import pericolanti''
task :pericolanti => :environment do
UnsafeBuilding.delete_all
puts "Creating unsafe_buildings..."
lines = FasterCSV.read(''/home/user/Docs/pericolanti'')
lines.each do |row|
if row.any?
# controllo che row[10] e row[11] non siano stringhe
barrier_meters = row[10] if row[10].is_a?(Float) or
row[1...
2011 May 28
4
how can I investigate when a rspec test fails?
For example:
it "re-renders the ''new'' template" do
# Trigger the behavior that occurs when invalid params are submitted
Sector.any_instance.stub(:save).and_return(false)
post :create, :sector => {}
response.should render_template("new")
end
I have the new template under app/views/sectors but the test says:
SectorsController POST