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.25.3 lib/awspec/matcher/belong_to_metric.rb
awspec-0.25.2 lib/awspec/matcher/belong_to_metric.rb
awspec-0.25.1 lib/awspec/matcher/belong_to_metric.rb
awspec-0.25.0 lib/awspec/matcher/belong_to_metric.rb
awspec-0.24.2 lib/awspec/matcher/belong_to_metric.rb
awspec-0.24.1 lib/awspec/matcher/belong_to_metric.rb
awspec-0.24.0 lib/awspec/matcher/belong_to_metric.rb
awspec-0.23.0 lib/awspec/matcher/belong_to_metric.rb
awspec-0.22.1 lib/awspec/matcher/belong_to_metric.rb
awspec-0.22.0 lib/awspec/matcher/belong_to_metric.rb
awspec-0.21.6 lib/awspec/matcher/belong_to_metric.rb
awspec-0.21.5 lib/awspec/matcher/belong_to_metric.rb
awspec-0.21.4 lib/awspec/matcher/belong_to_metric.rb
awspec-0.21.3 lib/awspec/matcher/belong_to_metric.rb
awspec-0.21.2 lib/awspec/matcher/belong_to_metric.rb
awspec-0.21.1 lib/awspec/matcher/belong_to_metric.rb
awspec-0.21.0 lib/awspec/matcher/belong_to_metric.rb
awspec-0.20.2 lib/awspec/matcher/belong_to_metric.rb
awspec-0.20.1 lib/awspec/matcher/belong_to_metric.rb
awspec-0.20.0 lib/awspec/matcher/belong_to_metric.rb