File: body_spec.rb

package info (click to toggle)
ruby-http 1.0.2-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 520 kB
  • ctags: 322
  • sloc: ruby: 3,934; makefile: 8
file content (13 lines) | stat: -rw-r--r-- 295 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
RSpec.describe HTTP::Options, "body" do
  let(:opts) { HTTP::Options.new }

  it "defaults to nil" do
    expect(opts.body).to be nil
  end

  it "may be specified with with_body" do
    opts2 = opts.with_body("foo")
    expect(opts.body).to be nil
    expect(opts2.body).to eq("foo")
  end
end