Permalink
Browse files

All tests are passing on 1.2

Haven't tested in production at all yet though.
  • Loading branch information...
1 parent 2053f31 commit 7902b8ad4318b56218653a87aab1cdfce31651f5 @iloveitaly iloveitaly committed with romul Oct 25, 2012
View
5 Gemfile
@@ -2,8 +2,9 @@ source "http://rubygems.org"
gemspec
group :test do
- gem 'sass'
-
+ gem 'sass-rails', '~> 3.2.5'
+ gem 'coffee-rails', '~> 3.2.1'
+
if RUBY_PLATFORM.downcase.include? "darwin"
gem 'rb-fsevent'
gem 'growl'
View
8 app/models/spree/address_decorator.rb
@@ -25,7 +25,13 @@ def can_be_deleted?
end
def to_s
- "#{firstname} #{lastname}, #{address1} #{address2}, #{city}, #{state || state_name} #{zipcode}, #{country}"
+ [
+ "#{firstname} #{lastname}",
+ "#{address1}",
+ "#{address2}",
+ "#{city}, #{state || state_name} #{zipcode}",
+ "#{country}"
+ ].join("<br/>").html_safe
end
# UPGRADE_CHECK if future versions of spree have a custom destroy function, this will break
View
4 app/views/spree/checkout/_address.html.erb
@@ -38,6 +38,6 @@
<% end %>
<hr class="space" />
-<div class="form-buttons">
- <input type="submit" class="continue button primary" value="<%=t("save_and_continue") %>" />
+<div class="form-buttons" data-hook="buttons">
+ <%= submit_tag t(:save_and_continue), :class => 'continue button primary' %>
</div>
View
3 spec/models/address_spec.rb
@@ -36,8 +36,7 @@
it 'is displayed as string' do
a = address
- # address.to_s.should eq("#{a.firstname} #{a.lastname}<br/>#{a.address1} #{a.address2}<br/>#{a.city}, #{a.state || a.state_name} #{a.zipcode}<br/>#{a.country}".html_safe)
- address.to_s.should == "#{a.firstname} #{a.lastname}, #{a.address1} #{a.address2}, #{a.city}, #{a.state || a.state_name} #{a.zipcode}, #{a.country}".html_safe
+ address.to_s.should eq("#{a.firstname} #{a.lastname}<br/>#{a.address1}<br/>#{a.address2}<br/>#{a.city}, #{a.state || a.state_name} #{a.zipcode}<br/>#{a.country}".html_safe)
end
it 'is destroyed without saving used' do
View
8 spec/requests/address_spec.rb
@@ -8,13 +8,13 @@
visit spree.root_path
click_link I18n.t(:login)
- sign_in!(user);
+ sign_in!(user)
click_link I18n.t(:my_account)
- page.should have_content("Shipping Addresses")
+ page.should have_content(I18n.t(:shipping_addresses))
- click_link "Add new shipping address"
- page.should have_content("New Shipping Address")
+ click_link I18n.t(:add_new_shipping_address)
+ page.should have_content(I18n.t(:new_shipping_address))
end
end
View
4 spec/requests/checkout_edit_address_spec.rb
@@ -15,7 +15,7 @@
new_street = Faker::Address.street_address
fill_in I18n.t('activerecord.attributes.spree/address.address1'), :with => new_street
click_button "Update"
- current_path.should == spree.checkout_path
+ current_path.should == spree.checkout_state_path('address')
within("h1") { page.should have_content("Checkout") }
within("#billing") do
page.should have_content(new_street)
@@ -30,7 +30,7 @@
new_street = Faker::Address.street_address
fill_in I18n.t('activerecord.attributes.spree/address.address1'), :with => new_street
click_button "Update"
- current_path.should == spree.checkout_path
+ current_path.should == spree.checkout_state_path('address')
within("h1") { page.should have_content("Checkout") }
within("#shipping") do
page.should have_content(new_street)

0 comments on commit 7902b8a

Please sign in to comment.