Sha256: de0ac83d293420e0ccfd7e05671a0d296b57d115691846b9ea67b0779660cc24

Contents?: true

Size: 292 Bytes

Versions: 28

Compression:

Stored size: 292 Bytes

Contents

RSpec::Matchers.define :belong_to_metric do |name|
  match do |resource|
    if @namespace
      resource.namespace == @namespace && resource.metric_name == name
    else
      resource.metric_name == name
    end
  end

  chain :namespace do |namespace|
    @namespace = namespace
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
awspec-0.19.0 lib/awspec/matcher/belong_to_metric.rb
awspec-0.18.2 lib/awspec/matcher/belong_to_metric.rb
awspec-0.18.1 lib/awspec/matcher/belong_to_metric.rb
awspec-0.18.0 lib/awspec/matcher/belong_to_metric.rb
awspec-0.17.1 lib/awspec/matcher/belong_to_metric.rb
awspec-0.17.0 lib/awspec/matcher/belong_to_metric.rb
awspec-0.16.0 lib/awspec/matcher/belong_to_metric.rb
awspec-0.15.0 lib/awspec/matcher/belong_to_metric.rb