spec/file/data_spec.rb in fit_parser-0.0.4 vs spec/file/data_spec.rb in fit_parser-0.0.5

- old
+ new

@@ -13,18 +13,18 @@ its("new.record_type") { should eq(:file_id) } end context 'definition with multiple time the same field' do before :all do - @fields = FitParser::File::Definitions.class_variable_get :@@fields - @dyn_fields = FitParser::File::Definitions.class_variable_get :@@dyn_fields + @fields = FitParser::File::Definitions.fields + @dyn_fields = FitParser::File::Definitions.dyn_fields # force a fake definition for scaling of arrays FitParser::File::Definitions.add_field 2, 2, "field_array", :type => 6, :scale => 10, :offset => 0 end after :all do - FitParser::File::Definitions.class_variable_set :@@fields, @fields - FitParser::File::Definitions.class_variable_set :@@dyn_fields, @dyn_fields + FitParser::File::Definitions.fields = @fields + FitParser::File::Definitions.dyn_fields = @dyn_fields end before :each do def_file = example_file('record/message/definition_field_array.fit') data_file = example_file('record/message/data_field_array.fit')