decko-commons/decko

View on GitHub
mod/carrierwave/spec/set/type/file_spec.rb

Summary

Maintainability
A
0 mins
Test Coverage

Name your test subject if you need to reference it explicitly.
Open

          expect(subject.file.read.strip).to eq "file1"

Name your test subject if you need to reference it explicitly.
Open

        .to eq "/files/~#{subject.id}/#{subject.last_action_id}.txt"

Name your test subject if you need to reference it explicitly.
Open

          subject

Name your test subject if you need to reference it explicitly.
Open

          subject

Start context description with 'when', 'with', or 'without'.
Open

  context "creating" do

Start context description with 'when', 'with', or 'without'.
Open

  context "deleting" do

Name your test subject if you need to reference it explicitly.
Open

          expect(subject.file.url).to(

Start context description with 'when', 'with', or 'without'.
Open

    context "storage type: protected" do

Start context description with 'when', 'with', or 'without'.
Open

  context "updating" do

Start context description with 'when', 'with', or 'without'.
Open

    context "storage type: unprotected" do

Name your test subject if you need to reference it explicitly.
Open

            .to eq "~#{subject.id}/#{subject.last_action_id}.txt"

Name your test subject if you need to reference it explicitly.
Open

      expect(subject.file.url)

Name your test subject if you need to reference it explicitly.
Open

          Card["#{subject.name}+*self+*read"].delete

Name your test subject if you need to reference it explicitly.
Open

            .to eq "~#{subject.id}/#{subject.last_action_id}.txt"

Start context description with 'when', 'with', or 'without'.
Open

      context "unprotected" do

Name your test subject if you need to reference it explicitly.
Open

          expect(subject.db_content)

Name your test subject if you need to reference it explicitly.
Open

            eq "/files/~#{subject.id}/#{subject.last_action_id}.txt"

Name your test subject if you need to reference it explicitly.
Open

      expect(subject.original_filename).to eq "file2.txt"

Name your test subject if you need to reference it explicitly.
Open

          expect(subject.last_action.comment).to eq "file1.txt"

Name your test subject if you need to reference it explicitly.
Open

        .to eq "/files/~#{subject.id}/#{subject.last_action_id}.txt"

Name your test subject if you need to reference it explicitly.
Open

          expect(subject.original_filename).to eq "file1.txt"

Name your test subject if you need to reference it explicitly.
Open

          expect(File).to be_exist(subject.file.path)

Name your test subject if you need to reference it explicitly.
Open

      expect(subject.file.read.strip).to eq "file2"

Name your test subject if you need to reference it explicitly.
Open

          Card.create! name: "#{subject.name}+*self+*read",

Start context description with 'when', 'with', or 'without'.
Open

    context "storage type:" do

Start context description with 'when', 'with', or 'without'.
Open

      context "protected" do

Name your test subject if you need to reference it explicitly.
Open

            eq "/files/~#{subject.id}/#{subject.last_action_id}.txt"

There are no issues that match your filters.

Category
Status