Use #describe with String arg not symbol

See core commit:
3785fdc9ed

Signed-off-by: Alex Coles <alex@alexbcoles.com>
pull/6827/head
Alex Coles 10 years ago
parent 5642d75937
commit dc7b71a110
  1. 2
      spec/controllers/work_packages_bulk_controller_spec.rb
  2. 2
      spec/helpers/cost_objects_helper_spec.rb
  3. 18
      spec/models/cost_entry_spec.rb
  4. 2
      spec/models/default_hourly_rate_spec.rb
  5. 2
      spec/models/hourly_rate_spec.rb
  6. 8
      spec/models/labor_budget_item_spec.rb
  7. 10
      spec/models/permitted_params_spec.rb
  8. 2
      spec/models/rate_spec.rb
  9. 4
      spec/models/time_entry_spec.rb
  10. 6
      spec/models/user_spec.rb
  11. 6
      spec/models/work_package/ask_before_destruction_spec.rb

@ -30,7 +30,7 @@ describe WorkPackages::BulkController, :type => :controller do
allow(User).to receive(:current).and_return user
end
describe :update do
describe '#update' do
context 'when a cost report is assigned' do
before { put :update, ids: [work_package.id], work_package: {cost_object_id: cost_object.id} }

@ -23,7 +23,7 @@ describe CostObjectsHelper, :type => :helper do
let(:project) { FactoryGirl.build(:project) }
let(:cost_object) { FactoryGirl.build(:cost_object, :project => project) }
describe :cost_objects_to_csv do
describe '#cost_objects_to_csv' do
describe "WITH a list of one cost object" do
it "should output the cost objects attributes" do

@ -77,7 +77,7 @@ describe CostEntry, :type => :model do
let(:date) { Date.today }
describe "class" do
describe :visible do
describe '#visible' do
describe "WHEN having the view_cost_entries permission
WHEN querying for a project
WHEN a cost entry from another user is defined" do
@ -129,7 +129,7 @@ describe CostEntry, :type => :model do
end
describe "instance" do
describe :costs do
describe '#costs' do
let(:fourth_rate) { FactoryGirl.build(:cost_rate, :valid_from => 1.days.ago,
:rate => 10000.0,
:cost_type => cost_type) }
@ -216,7 +216,7 @@ describe CostEntry, :type => :model do
end
end
describe :overridden_costs do
describe '#overridden_costs' do
describe "WHEN overridden costs are seet" do
let(:value) { rand(500) }
@ -228,7 +228,7 @@ describe CostEntry, :type => :model do
end
end
describe :real_costs do
describe '#real_costs' do
describe "WHEN overrridden cost are set" do
let(:value) { rand(500) }
@ -240,7 +240,7 @@ describe CostEntry, :type => :model do
end
end
describe :valid do
describe '#valid' do
before do
cost_entry.save!
end
@ -318,7 +318,7 @@ describe CostEntry, :type => :model do
end
end
describe :user do
describe '#user' do
describe "WHEN a non existing user is provided (i.e. the user has been deleted)" do
before do
cost_entry.save!
@ -333,7 +333,7 @@ describe CostEntry, :type => :model do
end
end
describe :editable_by? do
describe '#editable_by?' do
describe "WHEN the user has the edit_cost_entries permission
WHEN the cost entry is not created by the user" do
before do
@ -388,7 +388,7 @@ describe CostEntry, :type => :model do
end
end
describe :creatable_by? do
describe '#creatable_by?' do
describe "WHEN the user has the log costs permission
WHEN the cost entry is not associated to the user" do
before do
@ -435,7 +435,7 @@ describe CostEntry, :type => :model do
end
end
describe :costs_visible_by? do
describe '#costs_visible_by?' do
describe "WHEN the user has the view_cost_rates permission
WHEN the cost entry is not associated to the user" do
before do

@ -25,7 +25,7 @@ describe DefaultHourlyRate, :type => :model do
let(:rate) { FactoryGirl.build(:default_hourly_rate, :project => project,
:user => user) }
describe :user do
describe '#user' do
describe "WHEN an existing user is provided" do
before do
rate.user = user

@ -25,7 +25,7 @@ describe HourlyRate, :type => :model do
let(:rate) { FactoryGirl.build(:hourly_rate, :project => project,
:user => user) }
describe :user do
describe '#user' do
describe "WHEN an existing user is provided" do
before do
rate.user = user

@ -32,7 +32,7 @@ describe LaborBudgetItem, :type => :model do
let(:project) { FactoryGirl.create(:valid_project) }
let(:project2) { FactoryGirl.create(:valid_project) }
describe :calculated_costs do
describe '#calculated_costs' do
let(:default_costs) { "0.0".to_f }
describe "WHEN no user is associated" do
@ -79,7 +79,7 @@ describe LaborBudgetItem, :type => :model do
end
end
describe :user do
describe '#user' do
describe "WHEN an existing user is provided" do
before do
item.save!
@ -105,7 +105,7 @@ describe LaborBudgetItem, :type => :model do
end
end
describe :valid? do
describe '#valid?' do
describe "WHEN hours, cost_object and user are provided" do
it "should be valid" do
expect(item).to be_valid
@ -157,7 +157,7 @@ describe LaborBudgetItem, :type => :model do
end
end
describe :costs_visible_by? do
describe '#costs_visible_by?' do
before do
project.enabled_module_names = project.enabled_module_names << "costs_module"
end

@ -22,7 +22,7 @@ require File.expand_path('../../spec_helper', __FILE__)
describe PermittedParams, :type => :model do
let(:user) { FactoryGirl.build(:user) }
describe :cost_entry do
describe '#cost_entry' do
it "should return comments" do
params = ActionController::Parameters.new(:cost_entry => { "comments" => "blubs" } )
@ -54,7 +54,7 @@ describe PermittedParams, :type => :model do
end
end
describe :cost_object do
describe '#cost_object' do
it "should return comments" do
params = ActionController::Parameters.new(:cost_object => { "subject" => "subject_test" } )
@ -138,7 +138,7 @@ describe PermittedParams, :type => :model do
end
end
describe :cost_type do
describe '#cost_type' do
it "should return name" do
params = ActionController::Parameters.new(:cost_type => { "name" => "name_test" } )
@ -182,7 +182,7 @@ describe PermittedParams, :type => :model do
end
end
describe :user_rates do
describe '#user_rates' do
it "should return new_rate_attributes" do
params = ActionController::Parameters.new(:user => { "new_rate_attributes" => { "0" => { "valid_from" => "2013-05-08", "rate" => "5002" },
"1" => { "valid_from" => "2013-05-10", "rate" => "5004" } } } )
@ -201,7 +201,7 @@ describe PermittedParams, :type => :model do
end
describe :new_work_package do
describe '#new_work_package' do
it "should permit cost_object_id" do
hash = { "cost_object_id" => "1" }

@ -22,7 +22,7 @@ require File.dirname(__FILE__) + '/../spec_helper'
describe Rate, :type => :model do
let(:rate) { FactoryGirl.build(:rate) }
describe :valid? do
describe '#valid?' do
describe "WHEN no rate is supplied" do
before do
rate.rate = nil

@ -242,7 +242,7 @@ describe TimeEntry, :type => :model do
expect(@default_example.rate).to eq(default_hourly_one)
end
describe :costs_visible_by? do
describe '#costs_visible_by?' do
before do
project.enabled_module_names = project.enabled_module_names << "costs_module"
end
@ -298,7 +298,7 @@ describe TimeEntry, :type => :model do
end
describe "class" do
describe :visible do
describe '#visible' do
describe "WHEN having the view_time_entries permission
WHEN querying for a project
WHEN a time entry from another user is defined" do

@ -29,13 +29,13 @@ describe User, :type => :model do
:project => project) }
let(:default_hourly_rate) { FactoryGirl.build(:default_hourly_rate, :user => user) }
describe :allowed_to do
describe '#allowed_to' do
describe "WITH querying for a non existent permission" do
it { expect(user.allowed_to?(:bogus_permission, project)).to be_falsey }
end
end
describe :allowed_to_condition_with_project_id do
describe '#allowed_to_condition_with_project_id' do
let(:permission) { :view_own_time_entries }
before do
@ -96,7 +96,7 @@ describe User, :type => :model do
end
end
describe :set_existing_rates do
describe '#set_existing_rates' do
before do
user.save
project.save

@ -46,7 +46,7 @@ describe WorkPackage, :type => :model do
:project => work_package2.project,
:cost_type => cost_type) }
describe :cleanup_action_required_before_destructing? do
describe '#cleanup_action_required_before_destructing?' do
describe 'w/ the work package having a cost entry' do
before do
work_package
@ -81,7 +81,7 @@ describe WorkPackage, :type => :model do
end
end
describe :associated_classes_to_address_before_destructing? do
describe '#associated_classes_to_address_before_destructing?' do
describe 'w/ the work package having a cost entry' do
before do
work_package
@ -104,7 +104,7 @@ describe WorkPackage, :type => :model do
end
end
describe :cleanup_associated_before_destructing_if_required do
describe '#cleanup_associated_before_destructing_if_required' do
before do
work_package.save!

Loading…
Cancel
Save