Skip to content
Snippets Groups Projects
Commit 02494f7c authored by Douwe Maan's avatar Douwe Maan
Browse files

Fix specs

parent 8a4d68c5
No related branches found
No related tags found
No related merge requests found
Loading
@@ -62,7 +62,7 @@ describe Gitlab::Metrics::Metric do
Loading
@@ -62,7 +62,7 @@ describe Gitlab::Metrics::Metric do
end end
   
it 'includes the timestamp' do it 'includes the timestamp' do
expect(hash[:timestamp]).to be_an_instance_of(Integer) expect(hash[:timestamp]).to be_an(Integer)
end end
end end
end end
Loading
Loading
Loading
@@ -29,19 +29,19 @@ describe Gitlab::Metrics::System do
Loading
@@ -29,19 +29,19 @@ describe Gitlab::Metrics::System do
   
describe '.cpu_time' do describe '.cpu_time' do
it 'returns a Fixnum' do it 'returns a Fixnum' do
expect(described_class.cpu_time).to be_an_instance_of(Integer) expect(described_class.cpu_time).to be_an(Integer)
end end
end end
   
describe '.real_time' do describe '.real_time' do
it 'returns a Fixnum' do it 'returns a Fixnum' do
expect(described_class.real_time).to be_an_instance_of(Integer) expect(described_class.real_time).to be_an(Integer)
end end
end end
   
describe '.monotonic_time' do describe '.monotonic_time' do
it 'returns a Fixnum' do it 'returns a Fixnum' do
expect(described_class.monotonic_time).to be_an_instance_of(Integer) expect(described_class.monotonic_time).to be_an(Integer)
end end
end end
end end
Loading
@@ -134,7 +134,7 @@ describe Gitlab::Metrics::Transaction do
Loading
@@ -134,7 +134,7 @@ describe Gitlab::Metrics::Transaction do
series: 'rails_transactions', series: 'rails_transactions',
tags: { action: 'Foo#bar' }, tags: { action: 'Foo#bar' },
values: { duration: 0.0, allocated_memory: a_kind_of(Numeric) }, values: { duration: 0.0, allocated_memory: a_kind_of(Numeric) },
timestamp: an_instance_of(Integer) timestamp: a_kind_of(Integer)
} }
   
expect(Gitlab::Metrics).to receive(:submit_metrics). expect(Gitlab::Metrics).to receive(:submit_metrics).
Loading
@@ -151,7 +151,7 @@ describe Gitlab::Metrics::Transaction do
Loading
@@ -151,7 +151,7 @@ describe Gitlab::Metrics::Transaction do
series: 'events', series: 'events',
tags: { event: :meow }, tags: { event: :meow },
values: { count: 1 }, values: { count: 1 },
timestamp: an_instance_of(Integer) timestamp: a_kind_of(Integer)
} }
   
expect(Gitlab::Metrics).to receive(:submit_metrics). expect(Gitlab::Metrics).to receive(:submit_metrics).
Loading
Loading
require 'spec_helper' require 'spec_helper'
   
describe CacheMarkdownField do describe CacheMarkdownField do
CacheMarkdownField::CACHING_CLASSES << "ThingWithMarkdownFields" caching_classes = CacheMarkdownField::CACHING_CLASSES
CacheMarkdownField::CACHING_CLASSES = ["ThingWithMarkdownFields"].freeze
   
# The minimum necessary ActiveModel to test this concern # The minimum necessary ActiveModel to test this concern
class ThingWithMarkdownFields class ThingWithMarkdownFields
Loading
@@ -54,7 +55,7 @@ describe CacheMarkdownField do
Loading
@@ -54,7 +55,7 @@ describe CacheMarkdownField do
end end
end end
   
CacheMarkdownField::CACHING_CLASSES.delete("ThingWithMarkdownFields") CacheMarkdownField::CACHING_CLASSES = caching_classes
   
def thing_subclass(new_attr) def thing_subclass(new_attr)
Class.new(ThingWithMarkdownFields) { add_attr(new_attr) } Class.new(ThingWithMarkdownFields) { add_attr(new_attr) }
Loading
Loading
Loading
@@ -1382,13 +1382,13 @@ describe Repository, models: true do
Loading
@@ -1382,13 +1382,13 @@ describe Repository, models: true do
   
describe '#branch_count' do describe '#branch_count' do
it 'returns the number of branches' do it 'returns the number of branches' do
expect(repository.branch_count).to be_an_instance_of(Integer) expect(repository.branch_count).to be_an(Integer)
end end
end end
   
describe '#tag_count' do describe '#tag_count' do
it 'returns the number of tags' do it 'returns the number of tags' do
expect(repository.tag_count).to be_an_instance_of(Integer) expect(repository.tag_count).to be_an(Integer)
end end
end end
   
Loading
@@ -1738,7 +1738,7 @@ describe Repository, models: true do
Loading
@@ -1738,7 +1738,7 @@ describe Repository, models: true do
   
context 'with an existing repository' do context 'with an existing repository' do
it 'returns the commit count' do it 'returns the commit count' do
expect(repository.commit_count).to be_an_instance_of(Integer) expect(repository.commit_count).to be_an(Integer)
end end
end end
end end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment