Rewrote MetricController specs to more correct format. Added test that check that after metric update new report shouldn't be created and associated report should be updated.
Removed #show for MetricController.
Authorization in a controller specs replaced with stubs for faster tests.
Also added format documentation to .rspec.
Factory for each model moved to a separate file.
Refactored Metric specs.
Refactored Report specs. Also overrided == method for Metric and added test for it.
Changed :truncation to :transaction for rspec. Specs now running much faster then before.
After update metric now redirects similar to MetricController#create.
Also fixed a bug in a one spec.
Renamed previous_record to previous_month. Updated validator name.
All dependent reports for metric update after metric save.
Also renamed #previous_record to previous_month.
Added tariff creation before some specs. Also default metric factory now without report.
Added tariff creation before WelcomeController specs.
Renamed #has_data to #months_with_data. Also removed caching in a variable.
Added capybara gem. Integration specs now located in a spec/features, moved from spec/requests.
Added spec to check that months that already have metric printed in a hidden div on a page.
Updated some gems. Added irbtool gem.
Rebased to develop branch. Removed duplicated factories created after rebase.