Cleanup for mobile build without errors
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
step "the list is marked as in need of help" do
|
||||
@list.needs_help.should_not be_true
|
||||
@list.needs_help.should_not be true
|
||||
@list.needs_help!
|
||||
end
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ step "then new product category with proper properties linked to the first produ
|
||||
sleep 1
|
||||
@product_category = ProductCategory.find_by_name 'New product category'
|
||||
@product_category.week_days.should == [0, 0, 1, 0, 0, 0, 0]
|
||||
@product_category.full_day.should be_true
|
||||
@product_category.full_day.should be true
|
||||
@product_category.product_ids.should == [@products.first.id]
|
||||
end
|
||||
|
||||
|
||||
@@ -29,9 +29,9 @@ describe List do
|
||||
list.paid_at.should be_kind_of Time
|
||||
end
|
||||
it "should set is_paid to true" do
|
||||
list.is_paid.should be_false
|
||||
list.is_paid.should be false
|
||||
list.is_paid!
|
||||
list.is_paid.should be_true
|
||||
list.is_paid.should be true
|
||||
end
|
||||
end
|
||||
|
||||
@@ -66,31 +66,31 @@ describe List do
|
||||
end
|
||||
|
||||
describe '#has_active_orders?' do
|
||||
its(:has_active_orders?) { should be_false }
|
||||
its(:has_active_orders?) { should be false }
|
||||
|
||||
it 'returns true when there are placed orders for the list' do
|
||||
create :order, supplier: supplier, list: list, section: section, state: 'placed'
|
||||
list.has_active_orders?.should be_true
|
||||
list.has_active_orders?.should be true
|
||||
end
|
||||
|
||||
it 'returns true when there are active orders for the list' do
|
||||
create :order, supplier: supplier, list: list, section: section, state: 'active'
|
||||
list.has_active_orders?.should be_true
|
||||
list.has_active_orders?.should be true
|
||||
end
|
||||
|
||||
it 'returns false when there are only delivered orders' do
|
||||
create :order, supplier: supplier, list: list, section: section, state: 'delivered'
|
||||
list.has_active_orders?.should be_false
|
||||
list.has_active_orders?.should be false
|
||||
end
|
||||
|
||||
it 'returns false when there are only closed orders' do
|
||||
create :order, supplier: supplier, list: list, section: section, state: 'closed'
|
||||
list.has_active_orders?.should be_false
|
||||
list.has_active_orders?.should be false
|
||||
end
|
||||
|
||||
it 'returns false when there are only cancelled orders' do
|
||||
create :order, supplier: supplier, list: list, section: section, state: 'cancelled'
|
||||
list.has_active_orders?.should be_false
|
||||
list.has_active_orders?.should be false
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -10,8 +10,8 @@ describe Order do
|
||||
let(:order) {create :order, supplier: supplier, list: list, state: 'placed' }
|
||||
subject { order }
|
||||
|
||||
its(:placed?) { should be_true }
|
||||
its(:active?) { should be_false }
|
||||
its(:placed?) { should be true }
|
||||
its(:active?) { should be false }
|
||||
|
||||
describe 'count_active_for_supplier_and_list' do
|
||||
before { order }
|
||||
|
||||
@@ -10,7 +10,7 @@ describe Product do
|
||||
pc2 = create :product_category, supplier: supplier
|
||||
|
||||
product = build :product, supplier: supplier, product_category_ids: [pc1.id]
|
||||
product.save.should be_true
|
||||
product.save.should be true
|
||||
product.reload
|
||||
pc1.reload
|
||||
pc2.reload
|
||||
|
||||
+1
-1
@@ -89,7 +89,7 @@ RSpec.configure do |config|
|
||||
}
|
||||
|
||||
# Use color in STDOUT
|
||||
config.color_enabled = true
|
||||
config.color = true
|
||||
config.fail_fast = false
|
||||
|
||||
# Use color not only in STDOUT but also in pagers and files
|
||||
|
||||
Reference in New Issue
Block a user